Semantic layout landmarks (header, nav, main, footer), online

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

Semantic layout landmarks (header, nav, main, footer) in one minute

What students need to know

<main> wraps the page's central content. Only one is permitted per page. <nav> semantically identifies the site navigation. Screen readers announce 'navigation landmark' when users reach it.

<header> is the visible page header landmark. <head> is the document metadata element - they are completely different. <nav> is the HTML5 semantic element for navigation. <menu> is not the standard choice for site navigation.

Mistakes students make

  • HTML tag names must be lowercase. <HEADER> should be written as <header>.
  • The header closing tag is missing its forward slash. It should be </header> not <header>.
  • HTML tag names must be lowercase. <NAV> and </NAV> should be written as <nav> and </nav>.
  • The href value must be in double quotes: href="about.html". href=about.html without quotes is invalid HTML.
PREVIOUS · MODULE 21Span: the inline container
YOU ARE HERE · MODULE 22Semantic layout landmarks (header, nav, main, footer)
NEXT · MODULE 23Content sectioning (section, article, aside)

Discover other journeys with this module

What students will learn in this module

Every question in Module 22

Quick questions

  1. Which semantic element wraps the site title and navigation at the top of a page?A<header>B<head>
  2. Which element contains the primary navigation links of a site?A<menu>B<nav>
  3. True or false: a page can have more than one <main> element.ATrueBFalse
  4. Which element wraps copyright and contact information at the bottom of a page?A<footer>B<bottom>
  5. True or false: semantic landmarks add visible styling to the page automatically.AFalseBTrue

Key terms

Students type the meaning of:

  • <main>

Match the pairs

<header>
  <h1>My Site</h1>
  <nav>Links</nav>
</header>
Match it to what it does
<footer>
  <p>Copyright 2024.</p>
</footer>
Match it to what it does
<main> contains the unique primary content - only one <main> per page is allowedMatch it to what it does
<nav> groups navigation links and tells assistive technology this is the site menuMatch it to what it does
<head><h1>Site Title</h1></head>Match it to what it does
<HEADER>
  <h1>Title</h1>
</HEADER>
Match it to what it does

Fill in the blanks

  1. <___>
      <h1>My Site</h1>
      <nav>Links</nav>
    </header>

    Hint: Type the semantic element that wraps the page header region

  2. <header>
      <___>
        <a href="home.html">Home</a>
      </nav>
    </header>

    Hint: Type the semantic element for site navigation links

  3. <___>
      <h2>Welcome</h2>
      <p>Content here.</p>
    </main>

    Hint: Type the semantic element for the page's primary content area

  4. <___>
      <p>Copyright 2024.</p>
    </footer>

    Hint: Type the semantic element that wraps the page footer region

  5. <header>
      <h1>Title</h1>
    </___>

    Hint: Type the element name for the closing tag of the page header region

Spot the error

Question 1

A<HEADER>B  <h1>My Site</h1>C  <nav>Links</nav>D</header>

Question 2

A<body>B  <header><header>C  <main><p>Content.</p></main>D  <footer>Info</footer>E</body>

Question 3

A<body>B  <header><h1>Site</h1></header>C  <NAV>Links</NAV>D  <main>Content.</main>E  <footer>Info</footer>F</body>

Question 4

A<header>B  <nav>C    <a href="home.html">Home</a>D    <a href=about.html>About</a>E  </nav>F</header>

Question 5

A<body>B  <header><h1>Title</h1></header>C  <nav><a href="home.html">Home</a></nav>D  <main><p>Content.</p></main>E  <Footer>Info</Footer>