CSS Introduction
CSS — Cascading Style Sheets — is the language that turns structured HTML into designed pages: color, spacing, layout, motion. In ten minutes you'll write your first rule and understand how the browser decides what wins when rules disagree.
1. What CSS is (and isn't)
HTML describes what things are — a heading, a paragraph, a list. CSS describes how they look. Keeping the two separate means one stylesheet can restyle a thousand pages, and one page can wear many designs.
h1 {
color: #3E6787;
font-size: 40px;
}Read it aloud: "for every h1, make the color steel blue and the size 40 pixels." The part before the braces is the selector; each property: value; pair inside is a declaration.
2. The cascade: who wins
"Cascading" is the C in CSS. When several rules target the same element, the browser resolves the conflict in order: origin and importance first, then specificity (how precise the selector is), then source order (later rules beat earlier ones).
p { color: gray; }
p { color: black; } /* same specificity, later — wins */3. Where the road leads
This path takes you from here to a finished, responsive project page: colors and backgrounds first, then the box model, typography, real layout with Flexbox and Grid, responsive design, visual effects, motion, and finally architecture and performance. Every lesson ends with a quiz; pass them all and the certificate is yours.
4. Try it yourself
Change the heading's color to #E0594A (coral) and make the paragraph gray. Press Run Code.
5. Quiz — check your understanding
CSS Introduction Quiz
4 questions · pass at 60%Q1. What does CSS control?
Q2. In h1 { color: red; }, what is h1?
color: red is the declaration inside it.Q3. Two rules with equal specificity target the same element. Which wins?
Q4. What does the "cascading" in CSS refer to?
Further reading: the exhaustive property-by-property reference at MDN Web Docs pairs well with this path.
Every lesson quiz you pass (60%+) is saved in your browser and counts toward the CSSmatic Certificate of Completion.