Home Tutorials HTML Tutorial Semantic HTML
Semantic HTML

Semantic HTML


23. Semantic HTML

Semantic HTML uses elements that describe the meaning of content, such as <header>, <nav>, <main>, <section>, <article>, <aside>, and <footer>. This improves accessibility, readability, and document structure.

Syntax

<header>...</header>
<main>...</main>
<footer>...</footer>

Example

<header>
    <h1>My Blog</h1>
</header>
<main>
    <article>
        <h2>First Post</h2>
        <p>Hello readers!</p>
    </article>
</main>
<footer>
    <p>Copyright 2026</p>
</footer>

Output

A structured page appears with a header, main article section, and footer.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Semantic HTML to test your knowledge.

Browse Quizzes »