It is tempting to build an entire page out of <div> tags. They are neutral, they do nothing surprising, and with enough classes you can style them into anything. But leaning on semantic HTML instead — tags that describe what content is, not just how it looks — quietly improves your accessibility, your SEO, and your own sanity when you return to the code months later.
What “semantic” means
A semantic element carries meaning. <nav> says “this is navigation.” <article> says “this is a self-contained piece of content.” <button> says “this is an interactive control.” A <div> says nothing at all. Browsers, screen readers, and search engines all read that meaning, so choosing the right tag hands them information for free.
The structural tags to reach for
Instead of a wall of divs, most pages map cleanly onto a small set of landmark elements:
<header> Site or section header
<nav> Primary navigation
<main> The main content (one per page)
<article> A standalone piece, like a blog post
<section> A thematic grouping of content
<aside> Related but secondary content
<footer> Footer for a page or section
Swap your outer divs for these and the document practically documents itself. A new developer can read the tag names and understand the page’s shape without touching the CSS.
Why it helps accessibility
This is the part that matters most. Screen-reader users navigate by landmarks — they jump straight to the <nav> or skip to <main>. A page built from generic divs offers them none of those signposts. Using a real <button> instead of a clickable div means it is keyboard-focusable and announces itself correctly, with no extra ARIA attributes needed. Semantics give assistive technology a map.
Why search engines care
Search crawlers use structure to understand your content. A single, clear <h1> followed by a logical <h2>/<h3> outline tells Google what your page is about far better than styled divs ever could. Semantic markup and good SEO are the same discipline viewed from two angles.
article vs section vs div: the decision people actually struggle with
The structural tags are easy to list and harder to choose between, so here’s the working test. Use <article> when the content would make sense lifted out of the page entirely — a blog post, a product card, a comment, a news item. (The test: could this go in an RSS feed on its own?) Use <section> for a thematic chunk of a larger whole, and give it a heading — “Features,” “Pricing,” “Reviews.” If you can’t imagine writing a heading for it, it isn’t a section. And <div> remains perfectly honorable for what it’s for: styling hooks and layout wrappers with no meaning to convey. Semantic HTML doesn’t mean zero divs — it means divs aren’t doing jobs a meaningful tag should.
Same spirit for smaller elements people forget exist: <time datetime="2026-07-08"> for dates machines should understand, <figure> with <figcaption> for images that carry captions, and <details>/<summary> — a native, accessible, zero-JavaScript accordion that far too many teams rebuild in React.
The button test: semantics in action
Nothing demonstrates the stakes like the clickable div. Compare what each version costs you:
<!-- The div "button": broken in four invisible ways -->
<div class="btn" onclick="save()">Save</div>
<!-- The real thing: everything works for free -->
<button type="button" onclick="save()">Save</button>
The div version can’t be reached with the Tab key, doesn’t respond to Enter or Space, announces itself to screen readers as meaningless text, and shows no focus outline. To fix it you’d need tabindex="0", role="button", a keydown handler for two keys, and focus styles — four patches to poorly imitate what <button> does natively. This generalizes into the first rule of ARIA, straight from the spec’s authors: don’t use ARIA when a native element already does the job. Links go places, buttons do things, and inputs come with labels — reach for the real elements and most accessibility work evaporates.
Heading order is structure, not styling
One semantic habit outweighs the rest for both screen readers and SEO: a logical heading outline. One <h1> per page stating what the page is; <h2> for its major sections; <h3> nested under the relevant <h2> — never skipping levels because the smaller font “looked right.” Screen-reader users routinely navigate by pulling up the heading list and jumping straight to the section they need; a page that leaps from <h1> to <h4> reads to them like a book with shuffled chapter numbers. If the correct heading level looks wrong visually, fix it in CSS — the tag encodes structure, the stylesheet controls appearance, and confusing those two jobs is where most semantic damage starts.
Frequently asked questions
Does semantic HTML directly boost rankings? Google is coy about individual signals, but the practical wins are real: crawlers extract your content structure more reliably, heading hierarchy feeds featured snippets, and the accessibility improvements reduce bounce — which does feed rankings. It’s a free bet with no downside.
How do I check my page’s semantics? Two quick audits: run Lighthouse’s accessibility pass (it flags missing landmarks, unlabeled buttons, and heading skips), and try navigating your page with only the Tab and Enter keys. If you can’t reach or activate something, neither can a lot of your users.
Is it worth retrofitting an old div-soup codebase? Do it opportunistically: fix the landmarks (<main>, <nav>, <header>) in one small pass — it’s an hour of work with outsized payoff — then upgrade interactive divs to real buttons and links as you touch each component. A full rewrite is rarely justified; steady improvement is.
The easy habit to build
You do not need to memorize a spec. Just pause before typing <div> and ask, “is there a tag that actually describes this?” Nine times out of ten there is. Adopt that one habit and your semantic HTML will improve steadily, making your pages friendlier to humans, assistive tech, and crawlers alike — all without a single extra line of CSS.

