×

html · level 3 · unit 3 · 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

makes every character arrive safely.

The head holds : facts about the page rather than things to show. Many of those facts go in <meta>, an empty element that lives only in the head.

A page is saved as numbers. The is the rule book for turning those numbers back into each character: letters, digits, symbols and emoji. Read with the wrong rule book, café can turn into café.

UTF-8 covers every language on Earth. Say so with <meta charset="utf-8">, and put it first in the head, before the title, so the browser knows the rule book before it reads a single word.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Café Olé</title>
  </head>
  <body>
    <h1>Café Olé</h1>
    <p>Crème brûlée, £4.50</p>
  </body>
</html>

Press show my page to see it here.

Browsers only look for the charset near the very top of the file, so first in the head is the safe place.