×

css · level 1 · unit 2 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

A missing ; or } can break more than one line.

A mistake in code that makes it do the wrong thing is called a . Two sneaky bugs in CSS are a missing semicolon and a missing curly bracket.

Leave out a ; and the browser reads that line and the next as one long, muddled value. It cannot understand that, so both declarations are skipped.

Leave out a } and the next rule gets trapped inside the one above, so it stops working too. When something breaks, look at the line above the first thing that broke.

<h1>Bake sale</h1>
<p>Cakes from 50p.</p>
h1 {
  color: navy
  background-color: gold;
}

Press show my page to see it here.

Run it: the heading stays black on white, because both declarations are skipped.