×

html · level 1 · unit 5 · lesson 2

  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

<title> names your page, and lang says its language.

The <title> lives in the head. Its words appear on the , the little label at the top of the window, and in search results. Keep it short and clear.

Add a lang attribute to the <html> tag to say which language the page is in. Use a : en for English, fr for French, cy for Welsh.

Screen readers use lang to pick the right voice, so your words sound right when they are read out loud.

<!doctype html>
<html lang="en">
  <head>
    <title>Pet club</title>
  </head>
  <body>
    <h1>Welcome to pet club</h1>
  </body>
</html>

Press show my page to see it here.

The title attribute is a different thing: it adds a pop-up note to one element.