×

css · level 1 · unit 2 · lesson 1

  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 mixes a colour from red, green and blue.

Names only go so far. A hex code like #ff6347 can make millions of colours. It is a # followed by six characters, read in three pairs: red, then green, then blue.

Each pair runs from 00, none at all, up to ff, as much as possible. The characters count from 0 to 9 and then carry on with a to f, so a comes after 9.

Screens mix light, so #ff0000 is full red with no green or blue. #000000 is no light at all, which is black. #ffffff is everything at full, which is white.

<h1>Tomato soup</h1>
<p>Hot, red and tasty.</p>
h1 {
  color: #ff6347;
}

Press show my page to see it here.

#ff6347 is exactly the same colour as the name tomato.