Semantic 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>© My Website</p>
</footer>
How It Looks Together
index.html
Note
Don't try to memorize all tags. Focus on understanding when to use each one.
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 22
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Section 1. Chapter 22