4 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.
<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.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.
Semantic means "with meaning". A semantic tag tells the browser — and Google, and a screen reader — what its content is, not just how it looks. <article> says "this is a self-contained piece of writing". <nav> says "these are navigation links". A <div> says nothing at all. Same look on screen, completely different meaning underneath.
| Tag | Value | Description |
|---|---|---|
<header> | — | The top of a page or a section — logo, title, intro. |
<nav> | — | A block of navigation links, usually the main menu. |
<main> | — | The main content of the page. Only one per page. |
<section> | — | A themed group of content, usually with its own heading. |
<article> | — | A self-contained piece — a blog post, a news story, a product card. |
<aside> | — | Side content — a sidebar, related links, an advertisement. |
<figure> / <figcaption> | — | An image (or diagram) with its caption. |
<footer> | — | The bottom of a page or a section — copyright, contact, links. |
A blog post marked up semantically is easy to read — for people and for machines:
<article> <header><h2>My First Post</h2></header> <p>The post text goes here.</p> <footer>Posted on 28 October 2026</footer> </article>
<section> should almost always have a heading. If you cannot write a heading for it, it is probably not a section — a plain <div> is likely the right tag.<article> for anything that could stand alone — a blog post, a course card, a news item. If you can imagine it in an RSS feed on its own, it is an article.<div> for everything — header, nav, and footer exist for a reason.<main> elements — one page, one main.<section> — a section is a group of related content, not a wrapper for one line.<nav> — screen reader users then cannot jump to it.<header> — the top of the page, holding the site name. It says "this is the header", not just "this is a box".<nav> — the menu. A screen reader can jump straight to it instead of reading the whole page.<article> — the blog post. It is a self-contained piece of writing, so Google treats it as one unit.<time datetime="2026-10-27">27 October 2026</time> — the date in a format machines can read, while visitors see the friendly text.<footer> — the bottom of the page, with the copyright notice.<!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>
Change the code below and press Run to see the result instantly. No file to save, no login needed.
The questions learners ask most about this lesson — read the question, then open it to see the answer.
Using tags that describe what content is, not just how it looks, so Google and screen readers understand the page.
Article means a self-contained piece of writing like a blog post, while div means nothing at all.
A screen reader user can jump straight to nav or main content instead of listening to the whole page.
AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.
Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testPrefer watching? Video courses teach the same topics step by step.
Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Please log in to download. You will stay on this page after logging in!
New here? Register now →