π CSS is a styling language used to modify the appearance of web pages.
π‘ CSS offers flexibility in presentation and design, allowing for creative expression.
π Selectors in CSS, such as element, class, and ID selectors, enable the targeting of specific HTML elements for styling.
π CSS has different selectors, including class and id selectors.
π‘ Selectors can be combined to create more specific rules.
π Styles can be shared between selectors using comma-separated values.
π₯ There are three ways to load CSS styles into an HTML page.
π― Inline CSS styles should be avoided as they mix presentation with content and are not reusable.
π‘ Using the style HTML element is better than inline styles, but still not ideal as the presentation is defined in the HTML file.
π The best way to define CSS styles is by using a separate CSS file and linking it to the HTML file using the link element.
π CSS takes the last defined style for an element.
π Selectors have different levels of specificity: id, class, and element.
π¨ Inline styles override everything in the style sheet.
π CSS can be used to change the text color in an application.
π Hexadecimal colors are used to define specific colors in HTML.
π¨ RGB and RGBA are alternative ways to define colors in CSS, allowing for transparency.
Colors in HTML can be defined using RGB, HEX, and HSL values.
The HSL value determines the hue, saturation, and lightness of a color.
The box model in CSS consists of content, padding, border, and margin.
π¦ The box model is made up of content, padding, border, and margin.
π Different units, such as pixels, percentage, em, and rem, can be used in CSS to define sizes.
π¨ Understanding these basic CSS rules allows you to create a basic website.