HTML & CSS Practice
Hands-on HTML and CSS lessons - write real markup and styles, watch the page redraw as you type, and get checked instantly.
HTML & CSS Practice
Twelve short, hands-on HTML and CSS lessons: start with a heading and a paragraph, learn what a class is for, then build the layouts you actually build at work - a row of cards, a centred box, a nav bar, a gallery. Every lesson gives you a task, a live preview, and a Run button. Your page redraws as you run it, and the checks tell you what is still off. Everything runs in your browser.
The last four are the ones that make people quietly hate CSS. Nothing errors - CSS has no traceback, so a rule that never applies looks exactly like a rule you forgot to write. A box that overflows because padding was added to a width, a colour that loses to a more specific selector, a margin that escapes its parent, and a card that a single long word tears open.
Start with lesson 1. You can leave and come back any time - your code is saved locally.
Lessons
12 total- 01 Your first page: a heading and a paragraph
- 02 Links and lists: what a list actually is
- 03 Your first stylesheet: colour and size
- 04 Classes: styling one box, not all of them
- 05 Padding, border, margin: the box around everything
- 06 Flexbox: a row of cards
- 07 Centring a box: the one everyone googles
- 08 A nav bar with space between
- 09 Fix the bug: the padding that made the box too big
- 10 Fix the bug: a colour that refuses to change
- 11 Fix the bug: the margin that escapes
- 12 Capstone: a card that survives real content