Page structure with semantic HTML
You could build a whole page out of <div> boxes, and many old sites did. But a <div> says nothing about what it contains. Semantic elements describe their role:
| Element | Use for |
|---|---|
<header> |
the top of the page: logo, title, maybe navigation |
<nav> |
the main navigation links |
<main> |
the page's main content (only one per page) |
<article> |
a self-contained piece: a post, a product, a news story |
<section> |
a themed group of content with its own heading |
<aside> |
side content: tips, related links |
<footer> |
the bottom: copyright, contact, small print |
<body>
<header>
<h1>Harare Bakes</h1>
<nav>...</nav>
</header>
<main>
<article>...</article>
</main>
<footer>...</footer>
</body>
They look exactly like <div> until you style them. The difference is meaning:
- Screen readers let blind users jump straight to the navigation or the main content.
- Search engines understand which part of the page matters.
- You, six months later, can read the structure at a glance.
Your task
Restructure the page with semantic elements:
- A
<header>containing the<h1>and the navigation. - A
<nav>around the list of links. - One
<main>around the two articles, each in its own<article>. - A
<footer>around the copyright line.