SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 29 of 30

HTML Semantics

2 min read · Free · No login needed

Semantic HTML means using tags that describe what the content is, not just how it looks. <article> means "this is a self-contained piece of writing". <nav> means "this is navigation". A <div> means nothing at all. Both can look identical on screen — but to Google and to screen readers, they are very different.

The main semantic tags

  • <header>, <footer> — top and bottom of a page or a section.
  • <nav> — navigation links.
  • <main> — the main content (one per page).
  • <article> — a blog post, a news story, a product card.
  • <section> — a themed group inside a page.
  • <aside> — side content related to the main content.
  • <figure> and <figcaption> — an image with its caption.
  • <time> — a date or time, in a format machines can read.

Why it matters

Search engines: Google uses semantic tags to understand your page. An article inside an <article> tag is more likely to appear in search results than the same text inside a pile of divs. Accessibility: a blind visitor using a screen reader can jump straight to the <nav> or the <main> content instead of listening to the whole page. Maintenance: six months later, <article> tells you what the code is; <div class="x"> does not.

Tip: A good test: if you remove all the CSS from your page, the structure should still make sense when read top to bottom. That is what semantic HTML gives you.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Semantics</title>
</head>
<body>

<header><h1>KAMALDNP Blog</h1></header>
<nav><a href="#">Home</a> | <a href="#">Blog</a></nav>
<main>
<article>
<h2>How to Learn HTML</h2>
<p>Start with the basics, practise every day…</p>
<time datetime="2026-10-27">27 October 2026</time>
</article>
</main>
<footer><p>© 2026 KAMALDNP Academy</p></footer>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Semantics
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

Android & iOS App Development using Flutter 2026
₹5,000
View
Summer Industrial Training in MERN Stack 2026
₹3,000
View
WordPress Website Development Course (10 Days)
₹399
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →