×

css · level 1 · unit 1 · 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 says what to style and how.

CSS is made of rules. A rule starts with a , which picks the elements to style. Here h1 picks every <h1>. Then come curly brackets, { and }, which hold the instructions.

Each instruction is a and a . The property is what to change, like color for the colour of the text. The value is what to change it to, like gold.

A colon goes between them and a semicolon ends the line. CSS uses American spelling, so it is always color, never colour.

<h1>Gold medal</h1>
<p>Well done, Sam!</p>
h1 {
  color: gold;
}

Press show my page to see it here.

Read it as: for every h1, set the colour of the text to gold.