The title element, online

Six activities your students do on their own devices. See who's finished, and their scores.

The title element in one minute

What students need to know

The <title> element belongs in the <head> section. Placing it in <body> is invalid. The title content is plain text only. This example correctly uses text with no nested elements.

The <title> content shows in the browser tab and bookmarks, not on the visible page. A page should have exactly one <title>. Having two is invalid HTML.

Mistakes students make

  • The <title> element must be inside a <head> element. Here <head> is missing - <title> cannot appear outside it.
  • <titel> is a misspelling. The correct element name is <title> - browsers will not recognise <titel> as the page title.
  • The title element is closed with <title> instead of </title>. A closing tag must have a forward slash: </title>.
  • <title> must be inside <head>, not inside <body>. Content in <body> is visible on the page; <title> sets the browser tab text.

Discover other journeys with this module

What students will learn in this module

Every question in Module 5

Quick questions

  1. Where must the <title> element be placed?AInside <body>BInside <head>
  2. Where does the title text appear?AIn the browser tabBAs a heading on the page
  3. True or false: a page can have two <title> elements.AFalseBTrue
  4. Which of these correctly places a title in the document?A<head><title>My Page</title></head>B<body><title>My Page</title></body>
  5. True or false: you can put HTML tags like <b> inside a <title> element.ATrueBFalse

Key terms

Students type the meaning of:

  • <title>

Match the pairs

<title>My Portfolio</title>Match it to what it does
<head>
  <title>Shop</title>
</head>
Match it to what it does
<title> must be placed inside <head>, not <body>Match it to what it does
<title> contains plain text only - no nested HTML tags allowed inside itMatch it to what it does
<body>
  <title>Home</title>
</body>
Match it to what it does
<title>My <b>Page</b></title>Match it to what it does

Fill in the blanks

  1. <head>
      <___>My Page</title>
    </head>

    Hint: Type the element name that sets the browser tab text

  2. <head>
      <title>Home</___>
    </head>

    Hint: Type the closing tag name that ends the title element

  3. <!DOCTYPE html>
    <html>
      <___>
        <title>Shop</title>
      </head>
    </html>

    Hint: Type the section tag that must contain the title element

  4. <head>
      <title>Portfolio</___>
    </head>

    Hint: Type the tag name needed to close the title element

  5. <!DOCTYPE html>
    <html>
      <head>
        <___>Blog</title>
      </head>
      <body></body>
    </html>

    Hint: Type the element name that sets the browser tab text inside head

Spot the error

Question 1

A<title>My Site</title>B  <meta charset="UTF-8">C</head>

Question 2

A<head>B  <titel>My Page</titel>C  <meta charset="UTF-8">D</head>

Question 3

A<head>B  <meta charset="UTF-8">C  <title>My Blog<title>D</head>

Question 4

A<!DOCTYPE html>B<html>C  <head></head>D  <body>E    <title>Store</title>F  </body>

Question 5

A<head>B  <meta charset="UTF-8">C  <title>News</title>D  <title>Latest</title>E</head>