Semantic tags describe what your content means, not just how it looks. This visual lesson shows the page-structure landmarks, when to use each tag, how to choose between section, article, and div, and how to turn “div soup” into clean, accessible HTML.
Step 1
What does “semantic” mean?
A semantic tag has meaning — it tells the browser, search engines, and screen readers what a piece of content is. A <nav> is navigation; a <button> is a button. A plain <div> or <span> means nothing — it's a generic box.
Both render identically. But the semantic version communicates structure — and that's what makes it better for accessibility, SEO, and your own sanity six months from now.
Step 2
The page map: structural landmarks
Most pages share the same skeleton. These landmark elements mark the major regions — screen readers let users jump straight between them.
<header>logo, site title, intro
<nav>main menu / links
<main>the unique content of this page
<article> — a self-contained post
<section> — a themed group
<aside>side info, related links
One <main> per page. Everything that's unique to this page goes inside it — not the header, nav, or footer that repeat across the site.
Step 3
The structural landmarks
<header>
Introductory content for the page or a section — logo, site title, a section heading. You can have more than one.
<nav>
A block of major navigation links. Use it for the main menu and big in-page menus — not for every single link.
<main>
The one main content area unique to this page. Exactly one per page, and not nested inside header/nav/footer.
<footer>
Closing content for the page or a section — copyright, contact, secondary links. Can also repeat per-section.
A self-contained piece that would make sense on its own — a blog post, a news story, a product card, a comment. If you could syndicate it in an RSS feed, it's an article.
<section>
A thematic group of related content, usually with its own heading — “Features,” “Pricing,” “Reviews.” A chapter, not the whole book.
<aside>
Content tangentially related to what's around it — a sidebar, a pull quote, related links, an ad. Removing it wouldn't break the main point.
<div>
No meaning at all — a generic box only for styling or layout when no semantic element fits. The fallback, not the default.
Step 5
Which one do I use? A quick decision guide
When you're not sure, ask these questions in order:
Does it make sense completely on its own (could be reused or syndicated)?
→ Use <article> (a post, card, review, comment).
Is it a themed group of related content with a heading?
→ Use <section> (Features, FAQ, About).
Is it side info that complements but isn't essential?
→ Use <aside> (sidebar, related links, pull quote).
Is it just a wrapper for CSS/layout with no meaning?
→ Use <div> — that's what it's for.
Don't reach for <section> just to wrap things. If there's no natural heading and it's purely for styling, a <div> is the honest choice. A <section> should belong in the page's outline.
Step 6
Text-level semantic tags
Semantics aren't only about big regions. These inline tags add meaning to words — and unlike styling-only tags, they're announced by screen readers.
Tag
Means
Renders as
<strong>
Strong importance (not just bold)
Warning!
<em>
Emphasis / stress (not just italic)
really
<mark>
Highlighted / relevant text
match
<time>
A machine-readable date or time
<time datetime="2026-05-31">May 31</time>
<abbr>
An abbreviation, with a title
HTML
<blockquote>
A long quotation from a source
an indented quote
<figure>/<figcaption>
An image/diagram with its caption
image + caption
Meaning over looks: use <strong>/<em> when the words matter more, and <b>/<i> only for pure visual styling with no added importance (rare). For anything visual, CSS is usually the better tool.
Step 7
Headings build the document outline
Headings (<h1>–<h6>) aren't just big text — they create an outline screen-reader users navigate like a table of contents. Use them in order; don't skip levels for size (that's CSS's job).
<h1>Page title</h1>one per page<h2>Major section</h2><h3>Subsection</h3><h2>Another major section</h2>
Don't pick a heading by size. Need a smaller-looking heading? Keep the correct level (<h3>) and shrink it with CSS — never jump from <h2> to <h4> just to make it look right.
Step 8
From div soup to semantic
Here's the same page written both ways. Same pixels — very different meaning.
Notice the logo wrapper stayed a <div> — that's correct, it's just a styling box. Everything with real meaning got a semantic tag.
Step 9
Why it's worth the effort
Accessibility
Screen-reader users jump between landmarks and headings. Semantic HTML gives them that map for free.
SEO
Search engines understand structure — what's the main content, what's navigation, what's the heading hierarchy.
Maintainable
<nav> and <footer> tell the next developer (and future you) exactly what each block is.
Less work
Default behavior & styling hooks come built in — you write less code to get correct, accessible results.
Step 10
Semantic checklist
One <main> per page, with the unique content inside it
<header>, <nav>, and <footer> mark the repeating regions
Self-contained items are <article>; themed groups are <section> (with a heading)
<div> only where there's no meaning — pure layout/styling
One <h1>, then <h2> → <h3> in order, no skipped levels
<strong>/<em> for meaning; CSS for looks
Real <button> and <a> instead of clickable <div>s
Step 11
Every tag on one page
Here's a complete little page built almost entirely from semantic tags — a mini blog article with a header, navigation, sidebar, and footer. First the rendered result, then the exact code below. See how many tags from this lesson you can spot.
The rendered page
The Daily Pixel
Why Semantic HTML Matters
Published
Written by Dr. G
Semantic markup is important and genuinely changes how machines read your page. Searching for semantic HTML returns millions of results. The W3C sets the standards, and a landmark is a major region of a page.
Water is H2O and 210 = 1024. Was $50, now $40. We removed this added this. Press Ctrl+S to save; it printed Saved!. The variable x holds the total. const x = 1; Prices include tax.
Figure 1 — A photo with its caption, grouped in a figure.
What people say
Good structure is invisible until it's missing.
The Elements of Typographic Style
As they say, meaning beats appearance.
Quick facts
Unordered list (order doesn't matter)
Readable by screen readers
Better for SEO
Ordered list (steps in sequence)
Write semantic tags
Validate
Ship
Description list (term + definition)
HTML
Structure and content.
CSS
Styling and layout.
A fifth-level heading
A sixth-level heading
Your progress
Lesson completion:
Quiz score: 9 out of 10
3 + 4 =
Bonus: what's a disclosure widget?
It's this expandable box — built from details and summary, no JavaScript needed.
Spot the tags: this one page uses header, nav, main, article, section, aside, footer, h1–h6, figure, blockquote, ul/ol/dl, details, progress, meter, dialog, and a dozen inline tags — with only one div-free structure holding it together.