How to Fix Semantic HTML Structure for AI and Search Parsers
Your audit flagged pages whose layout is built almost entirely from generic div and span elements, so parsers cannot tell the navigation from the main content. By the end of this guide, every template on your site will use header, nav, main, article, section and footer landmarks, and you will have confirmed the change on live pages.

Why it matters
Search engines, AI answer engines and reader-mode tools use landmark elements to separate your real content from menus, cookie banners and footers. When everything is a div, they have to guess, and they sometimes quote boilerplate or skip the paragraph that answers the question. The ranking effect is small, but semantic landmarks also give screen reader users skip-to-content navigation, and the fix usually means editing only two or three shared templates.
What you need
Step-by-step fix
Inventory the landmarks on a flagged page
Open one flagged URL, press F12, go to the Console tab and paste the snippet below. It counts each semantic element on the page. A failing page typically shows 0 for main, article and nav.
Repeat on one page from each template type (home, blog post, product, category, contact) because the fix belongs in the template, not the individual page.
['header','nav','main','article','section','aside','footer'].forEach(t => console.log(t, document.querySelectorAll(t).length));
Convert the site header and menu
In your shared header template, change the outer wrapper div to <header> and the menu wrapper to <nav>. Keep the existing class names so your CSS keeps working. If you have more than one menu (main and utility links), give each nav a distinct aria-label.
<header class="site-header">
<a href="/" class="logo">Example Co</a>
<nav class="menu" aria-label="Main">
<ul>
<li><a href="/services/">Services</a></li>
<li><a href="/blog/">Blog</a></li>
</ul>
</nav>
</header>Wrap the primary content in a single main
Find the div that holds the unique content of each page, everything between the header and the footer, excluding sidebars, and change it to <main>. Use exactly one visible main per page and never nest it inside header, footer, article or aside. Add id="content" so a skip link can target it.
<a href="#content" class="skip-link">Skip to content</a> <header>…</header> <main id="content" class="content"> <!-- page-specific content --> </main>
Use article, section and aside inside main
Mark self-contained content with <article>: a blog post, a product description, a news item, a review. Use <section> for thematic groups that start with a heading, such as Pricing or FAQ blocks. Move sidebars and related-post widgets into <aside>.
- article: would make sense if syndicated on its own
- section: always begins with an h2 or h3
- aside: tangential content, not the answer itself
<main id="content">
<article>
<header>
<h1>How to Choose a Standing Desk</h1>
<p>By Jane Doe · <time datetime="2026-01-15">15 Jan 2026</time></p>
</header>
<section>
<h2>Desk height</h2>
<p>…</p>
</section>
</article>
<aside aria-label="Related posts">…</aside>
</main>Convert the footer and check your styles
Change the bottom wrapper div to <footer>. Then reload pages and look for layout shifts: CSS rules that target div.content or div > .menu stop matching once the tag changes. Update those selectors to use the class only (for example .content instead of div.content).
<footer class="site-footer"> <nav aria-label="Footer">…</nav> <p>© 2026 Example Co</p> </footer>
Verify the result and re-run the audit
Deploy, clear any page cache or CDN cache, and run the console snippet from step 1 again on each template type. You should see 1 for main, at least 1 for header, nav and footer, and article on posts and products. Then open DevTools > Elements > Accessibility pane (Chrome) and confirm the landmarks appear in the tree.
Finally re-run your site audit so the flagged URLs are re-crawled.
curl -s https://example.com/blog/standing-desk/ | grep -oE '<(header|nav|main|article|section|aside|footer)[ >]' | sort | uniq -c
Platform-specific notes
WordPress
Block themes: go to Appearance > Editor > Patterns > Template Parts to edit Header and Footer, and for any Group block open the block sidebar > Advanced > HTML element and choose header, main, section, article, aside or footer. Classic themes: edit header.php, footer.php and single.php in a child theme. Most current themes already output main and article; flagged pages are usually built with a page builder that wraps everything in divs.
Shopify
Go to Online Store > Themes > … > Edit code. Edit layout/theme.liquid to confirm {{ content_for_layout }} sits inside <main id="MainContent">, and check sections/header.liquid and sections/footer.liquid. Online Store 2.0 themes such as Dawn already do this; older or heavily customised themes often do not.
Webflow
Select a Div Block or Section, open the Settings panel (gear icon) and change the Tag dropdown to Header, Nav, Main, Article, Section, Aside or Footer. The Navbar component already outputs nav; you still need to set Main on your page wrapper.
Wix
In Wix Studio, select a section or container, open the Inspector panel > Accessibility and set the semantic HTML tag. Wix assigns header and footer to the site header and footer automatically. The classic Wix Editor offers less control; set the page heading levels correctly and use Wix Studio for full tag control.
Next.js / React
Put header, nav and footer in app/layout.tsx and wrap {children} in <main>. In page components, return <article> or <section> instead of a wrapper div, and avoid adding a second main inside individual pages.
Check that it worked
✅ How to verify
- Run the console snippet on each template type and confirm exactly one main plus header, nav and footer on every page
- Fetch the raw HTML with curl or View Source (Ctrl+U) to confirm the tags are in the server-rendered markup
- Check the Chrome DevTools Accessibility pane or the axe DevTools extension for landmark rules like 'Document should have one main landmark'
- Re-run the site audit and confirm the Semantic HTML structure check passes for the previously flagged URLs
⚠️ Common mistakes
- Adding more than one main element or nesting main inside an article or header
- Wrapping every block in section without a heading, which adds noise instead of structure
- Changing tags but leaving CSS selectors like div.content, which breaks the layout
- Fixing individual pages in a page builder instead of the shared header, footer and post templates, so new pages fail again
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Does semantic HTML improve SEO rankings?
Not directly in a measurable way. It helps search engines and AI systems identify your main content and ignore boilerplate, which improves how your pages are summarised and quoted, and it fixes accessibility landmark issues.
What is the difference between article and section?
Use article for content that stands on its own, like a blog post or product. Use section for a themed part of a page or article that starts with its own heading, like a FAQ or pricing block.
Can a page have more than one header or footer element?
Yes. One site-wide header and footer, plus header and footer elements inside each article, are valid. Only main is limited to one visible instance per page.
Do I need ARIA roles like role="main" as well?
No. Native elements such as main, nav and footer already expose those roles to browsers and assistive technology. Add aria-label only when you have multiple nav or aside elements that need distinguishing.
How to Fix Question-Style Headings for AI Search
How to Put Product Specs in HTML Text, Not Images
How to Add a TL;DR or Key Takeaways Box to Long Content
How to Fix Missing Pricing Information for AI Crawlers
How to Add Expert Quotes and a Unique POV for AI Citations
How to Fix Wrong Facts About Your Brand in AI Answers