Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Semantic HTML and Page Structure | Section
HTML Essentials

bookSemantic HTML and Page Structure

Swipe to show menu

So far, you've learned how to build elements on a web page. Now let's improve how your content is structured and understood.

What Is Semantic HTML?

Semantic HTML means using elements that clearly describe the purpose of your content. Instead of using generic containers like <div>, you use meaningful tags like:

  • <header>;
  • <nav>;
  • <section>;
  • <article>;
  • <footer>.

Why It Matters

  • Helps browsers and developers understand your page structure;
  • Improves accessibility (screen readers rely on this);
  • Helps search engines better interpret your content.

Common Semantic Elements

<header>

Represents the top part of a page or section (logo, title, navigation).

<header>
  <h1>My Website</h1>
</header>

<nav>

Defines navigation links.

<nav>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Services</a></li>
  </ul>
</nav>

<section>

Groups related content.

<section>
  <h2>Services</h2>
  <p>We offer web development...</p>
</section>

<article>

Represents standalone content (e.g., blog post).

<article>
  <h2>Blog Post</h2>
  <p>Content goes here...</p>
</article>

<footer>

Defines the bottom part of a page.

<footer>
  <p>&copy; My Website</p>
</footer>

How It Looks Together

index.html

index.html

copy
Note
Note

Don't try to memorize all tags. Focus on understanding when to use each one.

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 22

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 1. Chapter 22
some-alt