CSS from the ground up
Make it look the way you mean
- Beginner
- 12 chapters
- 176 min read
A hands-on introduction to CSS, from your first rule to responsive layouts and a small design system: every idea comes with a page you can restyle and see change in the same editor, with a short quiz at the end of each chapter.
What You'll Learn
- Write rules that choose the right elements and win without a fight
- Use colour and units that scale with the reader’s settings
- Understand the box model, and stop guessing where the space went
- Set type that is comfortable to read at any width
- Lay out pages with flexbox and grid
- Make one page work on a phone and a desktop
- Give controls hover, focus and active states that answer back
- Keep a palette in custom properties, so a change happens in one place
- Write the modern rules — nesting, :has(), container queries — with no build step
Prerequisites
- Some HTML — the HTML course on this site, or any page you can open in an editor
- No design experience; every rule is explained where it is used
Course Content
- 01How CSS worksNot started
What CSS actually is, how a stylesheet connects to a page, and the shape every rule has: choose something, then say what it should look like.
- 02SelectorsNot started
Choosing what to style: element names for the defaults, classes for the decisions, and the few combinators worth knowing.
- 03Colour and unitsNot started
Writing a colour three ways, measuring in units that scale, and the contrast rule that keeps text readable.
- 04The box modelNot started
Every element is a box: content, padding, border, margin — and the one line that makes the arithmetic sane.
- 05Text and fontsNot started
A readable page is mostly four decisions: the font, the size, the line spacing and the width of the column.
- 06FlexboxNot started
One dimension, one line of CSS: lay things in a row or a column, spread them out, and space them evenly.
- 07GridNot started
Two dimensions at once: columns that tile on their own, rows that line up, and no widths to calculate.
- 08Responsive designNot started
One page for every screen: fluid widths first, then a media query where the layout genuinely has to change.
- 09States and interactionNot started
A page that answers back: hover, focus and active states, a visible focus ring, and motion that helps instead of distracting.
- 10Custom propertiesNot started
Naming a value once and using it everywhere: the one change that turns a stylesheet into a system — and makes themes possible.
- 11A stylesheet, end to endNot started
Everything at once: one plain page styled from nothing, against the checklist this course has built up.
- 12Nesting, :has() and container queriesNot started
The three additions that changed how stylesheets are written: rules inside rules, a selector that sees what an element contains, and a component that answers to its own width.
