Skip to content
Tutorials Center
My learning

Topics

HTML Reference ยท Sections

The <section> element

Reference for the HTML <section> element: when a thematic section is right, section vs article vs div, the region role, headings, examples and technical details.

The <section> element represents a thematic section of a document or of an application: a group of content about one topic, which normally starts with a heading. Chapters of a long page, the tabs of a settings screen, or the "Features", "Pricing" and "FAQ" blocks of a landing page are all sections.

HTML
<section>
  <h2>Pricing</h2>
  <p>One plan, everything included.</p>
</section>

Try it

A landing page split into sections

Each section is named by its heading through aria-labelledby, which turns it into a region landmark that screen reader users can jump to.

Attributes

This element has no attributes of its own. It accepts the global attributes.

Usage notes

  • Choose the right container.
    • Content that stands on its own (a post, a card, a comment): <article>.
    • A part of a larger whole, with its own heading: <section>.
    • A box just for styling or scripting: <div>.
  • Give it a heading. A section without a heading is usually a sign that a <div> would be better. Use the heading level that fits the surrounding structure.
  • Landmarks need names. A section is exposed as a region landmark only when it has an accessible name (aria-labelledby or aria-label). Without one it is a generic element. Don't name every section: a few well-chosen regions are more useful than dozens.
  • Sections in articles, articles in sections. Both nestings are valid. A long article can be split into sections, and a section such as "Latest news" can contain several articles.

Technical summary

Content categories Flow content, sectioning content, palpable content
Permitted content Flow content
Tag omission None; both the start and end tags are required
Permitted parents Any element that accepts flow content
Implicit ARIA role region if it has an accessible name; otherwise generic
DOM interface HTMLElement
Default display block

Browser support

Supported in every browser.