Open the source code of many modern websites and you'll find a wall of <div> elements: divs for the header, divs for the menu, divs for buttons, divs inside divs. The page looks fine in a browser, but the markup says almost nothing about what each piece of content actually is. Semantic HTML fixes that by using elements whose names describe their purpose: <nav> for navigation, <main> for the primary content, <article> for a self-contained post, and so on.
There's a lot of overblown advice about semantic HTML and SEO. Some guides imply that swapping divs for HTML5 tags will lift rankings on its own. Google's own documentation is more measured, and it's worth understanding exactly where semantic markup helps search, where it helps accessibility, and where it makes little difference.
This guide explains the tags that matter, what Google has actually said about them, and a practical process for cleaning up your templates in 2026.
Key Takeaways
- Semantic HTML means choosing elements for their meaning, not their appearance.
- Google says it can rarely depend on semantic meanings hidden in the HTML specification, so tags alone are not a ranking lever.
- Some semantics directly affect search: real
<a href>links,<title>, headings,<img alt>and text that's actually in the HTML. - The biggest, most reliable benefit is accessibility, which improves usability for everyone.
- Clean, well-structured markup also makes content easier for search engines and AI systems to parse into sections.
What Is Semantic HTML?
“Writing semantic HTML means using HTML elements to structure your content based on each element's meaning”
— web.dev, Semantic HTML (Learn HTML)
A <button> is a button: it's focusable, it responds to the keyboard and screen readers announce it as a button. A <div class="btn"> styled to look like one is just a box until a developer adds a role, a tab index and key handlers. The same logic applies to page regions. MDN describes <article> as a self-contained composition intended to be independently distributable or reusable, such as a blog entry, forum post or product card. Using it signals that boundary to browsers and assistive technology.
What Google Actually Says About Semantic HTML
Google's SEO Starter Guide includes a section on things it believes you shouldn't focus on. On headings, it says heading order is fantastic for screen readers but that from Google Search's perspective it doesn't matter if you use them out of order. It goes further:
“Google Search can rarely depend on semantic meanings hidden in the HTML specification.”
— Google Search Central, SEO Starter Guide
That doesn't mean markup is irrelevant. It means Google is built to understand messy real-world pages, so it doesn't reward you for HTML5 tags in isolation. What it does depend on are a handful of elements with clear functional meaning. Google's link documentation, for instance, says it can generally only crawl a link if it's an <a> element with an href attribute. That's semantic HTML with a direct, measurable effect on discovery. For more on structuring headings well regardless of order, see our heading tags guide.
The Tags That Matter (and How Much)
| Element | Purpose | Search impact | Accessibility impact |
|---|---|---|---|
<title> | Document title | High: a primary source for title links | High: announced on page load |
<a href> | Hyperlink | High: required for reliable crawling | High: keyboard and screen reader navigation |
<h1>–<h6> | Headings | Medium: help Google understand topics and sections | High: screen reader users navigate by headings |
<img alt> | Image with text alternative | Medium: helps image search and context | High: describes images to non-sighted users |
<main>, <nav>, <header>, <footer> | Page landmarks | Low/indirect: clearer page structure | High: landmark navigation |
<article>, <section>, <aside> | Content grouping | Low/indirect | Medium |
<table>, <ul>, <ol> | Tabular data and lists | Medium: well-structured lists and tables are easy to extract | High: row/column and item counts announced |
<time datetime> | Machine-readable dates | Low: structured data is the stronger date signal | Low |
Images deserve their own attention; our guide to writing alt text covers the details.
Landmarks: header, nav, main, footer
web.dev explains that landmark roles help screen reader users jump to important sections. For example, a document-level <header> gets the banner role and a document-level <footer> gets contentinfo. Use exactly one <main> per page, wrapping the unique content and excluding repeated navigation and footers.
Article, section and aside
Use <article> for content that makes sense on its own (a blog post, a product card, a comment). Use <section> for a thematic group that normally has its own heading. Use <aside> for tangential content like related links or a callout box. Don't wrap every block in <section> just because it exists.
Lists and tables
Real lists and tables are one of the easiest semantic wins. A comparison built from styled divs is invisible as a table to machines; a proper <table> with <thead> and <th> cells is unambiguous. This matters increasingly as AI search systems extract passages; see our piece on content chunking for AI for why clear blocks help.
Div Soup vs Semantic Markup: Quick Swaps
Most templates can be improved with a handful of like-for-like replacements. None of these change how the page looks once your CSS is updated, but they all change what the markup communicates.
| Common non-semantic pattern | Semantic replacement | What improves |
|---|---|---|
<div class="header"> | <header> | Banner landmark for assistive tech |
<div class="menu"> with clickable spans | <nav> containing <a href> links | Crawlable links, navigation landmark |
<div class="btn" onclick> | <button> (actions) or <a href> (navigation) | Keyboard support, correct announcement |
<div class="title big"> | <h2> | Document outline, heading navigation |
| Grid of divs showing prices or specs | <table> with <th> headers | Data relationships are explicit |
Lines separated by <br> | <ul> or <ol> | Item count and grouping are explicit |
| Plain text date "14/10/26" | <time datetime="2026-10-14"> | Unambiguous machine-readable date |
A Semantic Page Template
Here is a simple, clean skeleton for a blog post:
<body>
<header>
<a href="https://example.com/">Brand</a>
<nav aria-label="Main">
<ul><li><a href="https://example.com/services/">Services</a></li></ul>
</nav>
</header>
<main>
<article>
<h1>Post title</h1>
<p>By <a href="https://example.com/author/jane/">Jane</a> ·
<time datetime="2026-10-14">14 October 2026</time></p>
<h2>First section</h2>
<p>…</p>
</article>
<aside>Related posts</aside>
</main>
<footer>Contact details</footer>
</body>
Pair this with Article structured data for explicit author and date signals, and with breadcrumbs for hierarchy.
Step-by-Step: Auditing Your Templates
- Pick one URL per template. Home, service page, category, product, blog post.
- View the raw HTML and the rendered DOM. Check that the main content, headings and links exist as real elements, not only after a click or scroll.
- Check links. Every navigation item should be an
<a href>. Replaceonclicknavigation on spans and divs. - Check headings. One clear
<h1>, logical<h2>/<h3>structure, no headings used just for font size. - Add landmarks. Wrap regions in
<header>,<nav>,<main>and<footer>. - Convert fake tables and lists. Replace div grids that present data with real tables and lists.
- Run an accessibility check. Lighthouse and browser accessibility panels flag missing labels, alt text and landmark issues.
- Trim the wrappers. Remove unnecessary nested divs; a lean DOM also helps performance (see excessive DOM size).
Common Mistakes
- Expecting a ranking boost from HTML5 tags alone. Google's documentation doesn't support that. Do it for clarity and accessibility.
- Multiple
<main>elements or wrapping the whole page in<main>, including navigation. - Headings chosen for style. Using
<h4>because it's the right font size makes the outline confusing. - Buttons that are links and links that are buttons. Navigation should be a link; actions (submit, open menu) should be a button.
- Hiding content behind JavaScript events. If text only appears after an interaction, it may not be seen; see our guide on tabs and accordions.
Semantic HTML and AI Search
AI Overviews, AI Mode and third-party assistants pull passages from pages to build answers. There's no official statement that HTML5 landmarks influence which sources they pick, so be wary of anyone who promises it. But the underlying principle holds: content that is plainly structured with descriptive headings, real lists and real tables is easier for any system to parse. Our article on how AI chooses sources covers the factors that matter more.
{FAQ}Build Cleaner Templates
Semantic HTML is a foundation, not a trick. It makes your site more accessible, easier to maintain and easier for machines to read. If you'd like a template audit as part of broader on-page optimisation, or want to understand the overlap with accessibility and SEO, get a quote from our team.
References
- Semantic HTML – web.dev
- SEO Starter Guide – Google Search Central
- Link best practices for Google
- The Article element – MDN Web Docs
- What Is Semantic HTML? – Semrush




