Tsallaka zuwa abun ciki
Justice Tech School

Semantic Layout

Semantic elements tell the browser and search engines what each part of the page is: header, nav, main, section, article, aside and footer.

They are better than a pile of div elements for accessibility and search ranking.

Example
<header><h1>My Blog</h1></header>
<nav><a href="#">Home</a> | <a href="#">About</a></nav>
<main>
  <article>
    <h2>First post</h2>
    <p>Hello everyone.</p>
  </article>
</main>
<footer>Copyright 2026</footer>

Exercise

Which element holds the main content of the page?

<>
  <p>Content</p>
</>

Quiz Test

Which is a semantic element?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.