Codeloft
0 0 XP

Page structure

7 min 20 XP + 10 for no hints

Real pages have regions: a top banner, a menu, the main content and a footer. HTML has a semantic tag for each: <header>, <nav>, <main> and <footer>.

They look like plain boxes, but they tell browsers, search engines and screen readers what each part is for. A screen-reader user can jump straight to <main> and skip the menu.

Use one <main> per page, and put your menu links inside <nav>.

Example
<header><h1>Sunny Bakes</h1></header>
<nav><a href="#">Menu</a> <a href="#">Contact</a></nav>
<main><p>Fresh bread every morning.</p></main>
<footer><p>Open 7am to 6pm</p></footer>
Semantic tags change nothing visually. You will style them with CSS later.

Your tasks

0 of 4 done
  1. Wrap the title in <header>
  2. Put both links inside <nav>
  3. Wrap the opening hours in <main>
  4. Put the phone number in a <footer>

Quick check

Why use <nav> instead of a plain <div> for a menu?

library.htmlUpdates as you type