Replace divs with landmarks

This page says nothing about its regions.

What to build

The same page with semantic elements.

Requirements

  • The header div becomes header.
  • The menu div becomes nav.
  • The content div becomes main.
  • The bottom div becomes footer.

Constraints

Leave no div elements. Keep the text.

Example

<div class="menu"> becomes <nav>.

Why it works

Each region can now be found by a screen reader, and search engines can tell the content from the surroundings.

Hints

Hint 1

The class names tell you which element each div should be.

Solution

Show one correct solution (try it yourself first)
<header><h1>My site</h1></header>
<nav><a href="/">Home</a></nav>
<main><p>Welcome.</p></main>
<footer><p>Goodbye.</p></footer>

Lesson: Semantic HTML: elements that mean something →