Guided Notes
Introduction to CSS
Selectors, properties, and how styles apply.
CSS (Cascading Style Sheets) controls how HTML looks — color, spacing, fonts, layout. A rule pairs a selector (what to style) with declarations (how): `button { background-color: blue; }`.
Selectors can target a tag (`button`), a class (`.card`), or an id (`#header`). When multiple rules could apply to the same element, specificity and source order decide which one wins — that's the 'cascading' part.
The same visual result can come from more than one selector or value — a blue background is blue whether you write `blue`, `#0000ff`, or `rgb(0,0,255)`. What matters is the rendered result.