BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
Web Development

HTML5 sectioning elements: When to use each one

Article, section, nav and aside mark out the parts of a page. Used well, they help screen reader users find their way around it.

Monthly searches · html5 sectioning elements
50
Keyword research data
html5 sectioning elements
HTML5 sectioning elements: When to use each one
Click the image to view it full size

The HTML standard groups four elements as "sectioning content": <article>, <section>, <nav> and <aside>. Each marks a part of the page with a particular role, and each sets the scope for the <header> and <footer> inside it. They arrived with HTML5, which is why people still call them HTML5 sectioning elements.

Three related elements usually come up in the same breath: <main>, <header> and <footer>. They aren't sectioning content in the standard's terms, but you'll use all seven together to lay out a page.

What each element is for

Element Use it for Example
<article> Something complete in itself, that would make sense on its own a blog post, a product card, a forum post, a comment
<section> A themed part of something larger, with its own heading the chapters of a guide, the "Reviews" part of a product page
<nav> A major block of navigation links the main menu, a table of contents, breadcrumbs
<aside> Content only loosely related to what's around it a sidebar, a pull quote, an ad, a related-posts box
<main> The page's main content, once per page everything except the site header, menu, sidebar and footer
<header> Introductory content for the page or a section the logo and menu, or a post's title and date
<footer> Closing information for the page or a section copyright and legal links, or a post's author and tags

Choosing between them

Article or section?

The standard's own short answer: a section forms part of something else; an article is its own thing. A chapter of a guide is a section. A short post that could be shared on its own is an article, and a comment on that post is an article too, because it isn't part of the post. When it's unclear, it comes down to what you mean.

Section or div?

<section> isn't a general-purpose box. If you only need a wrapper for styling or scripting, use <div>. A good test from the standard: use <section> only when its content would appear as an entry in the page's outline, which in practice means it has a heading.

Does every group of links need nav?

No. Keep <nav> for major navigation. A short row of links in the footer, like terms and contact, is covered by the <footer> alone.

Can a page have several of each?

Yes for articles, sections, navs, asides, headers and footers. Not for <main>: a page may have only one visible <main>.

Headings: the levels come from the tag

Older tutorials say you can start every section with an <h1> and let the nesting decide each heading's level. The standard no longer works that way. A heading's level comes from its tag, <h1> to <h6>, whatever section it sits in. WHATWG

So write the levels you mean: an <h1> for the page, <h2> for each main section, <h3> inside those. The standard requires that each heading is at most one level deeper than the one before it, so don't jump from <h2> to <h4>. See heading tags for more.

What screen reader users get

Several of these elements become landmarks: named regions a screen reader user can list and jump between, like a table of contents for the page layout. W3C

  • <main> becomes the "main" landmark, and <nav> a "navigation" landmark.
  • <aside> becomes a "complementary" landmark.
  • <header> and <footer> become the page's "banner" and "contentinfo" landmarks, but only when they aren't inside an article, aside, main, nav or section.
  • <section> becomes a "region" landmark only if it has a name, for example aria-labelledby pointing at its heading. Without a name, it's treated as a plain container.

If a page has more than one <nav>, give each a label (aria-label="Main", aria-label="Breadcrumb") so users can tell them apart. This is where the elements earn their keep: they make a page far easier to use for people on assistive technology. See accessibility.

Do they help SEO?

Not directly. Google says the web in general isn't valid HTML, so Google Search can rarely depend on the meanings the HTML standard gives to elements. Google Search Central Swapping <div> for <section> won't move a page in Google's results.

Bing's webmaster guidelines do list semantic HTML elements and a logical heading hierarchy among the ways to structure content clearly. The practical gain for search is the one you get anyway: a page with a clear structure and real headings is easier for every reader to understand, people and machines alike. That's the idea behind semantic HTML.

A blog post page, put together

<body>
  <header>
    <a href="/">Shop logo</a>
    <nav aria-label="Main">…</nav>
  </header>
  <main>
    <article>
      <h1>How to choose trail running shoes</h1>
      <section aria-labelledby="grip">
        <h2 id="grip">Grip</h2>
        <p>…</p>
      </section>
      <section aria-labelledby="fit">
        <h2 id="fit">Fit</h2>
        <p>…</p>
      </section>
      <footer>Written by Sam, updated March 2026</footer>
    </article>
  </main>
  <aside>
    <h2>Related guides</h2>
    …
  </aside>
  <footer>© Example Shop · <a href="/terms">Terms</a></footer>
</body>

The article's <footer> belongs to the article; the last <footer> belongs to the page. Every section has a heading, and the heading levels follow the structure.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.