CSS tutorial
The language that gives web pages color, spacing and layout. 12 short chapters, one idea each, every example runnable in the page.
Who it's for: Beginners who know a little HTML and want pages that look designed, plus developers who need Flexbox and Grid explained plainly.
Prerequisites: The first few HTML chapters. Every example renders in a sandboxed preview below the editor.

How this track works
Each chapter covers one CSS idea and ends with a live example: edit the styles, press Run, and the page renders in a sandboxed preview. Most examples finish with a line or two printed by a tiny script that asks the browser what it actually computed (a color, a width, a line height), so you can check your understanding against the real result instead of eyeballing it. Our build runs every example in Chromium and compares that text with what the page shows.
The order follows how stylesheets are written in practice: rules and selectors, then the cascade that settles conflicts, then color, units, the box model and type, and finally layout with Flexbox and Grid, responsive media queries, variables and transitions. Explanations cite the W3C CSS specifications.
All 12 chapters
- 01Get started
- 02Selectors
- 03Cascade and specificity
- 04Colors
- 05Units and sizes
- 06Box model
- 07Text and fonts
- 08Flexbox
- 09Grid layout
- 10Media queries
- 11Custom properties
- 12Transitions
Practice and reference
Final CSS quiz (12 questions)Cheat sheet: css selectorsOfficial CSS documentation

