- Better degree of formatting
- Easily maintainable websites
- Faster to access
- Quicker to download
- Can be adopted for different mediums
CSS Versions
Browser Adoption
CSS Syntax
Properties
Properties
Properties
selects all instances of a given HTML element
Grouped Selector
Universal Selector
Inheritance selector
Simultaneously target different HTML elements
Target a specific element by its ID attribute
Selecting via presence of element attribute or by the value of an attribute
Select something that does not exist explicitly as an element
Select elements based on their ancestors, descendants, or siblings
Cascade: Styles Interact
Principles to handle cascades (conflicts)
Specificity Algorithm
Location
When inheritance and specificity cannot decide
Box Model
think inside the box
Collapsing Margins