HTML <section> Tag

By Jonathan Griffin. Editor, SEO Consultant, & Developer.

· 2 min read


The <section> tag represents a generic section of a document or application and should include a thematic grouping of related content.


<!DOCTYPE html>
    <title>HTML Title Element goes here.</title>
    <h1>Displayed Page Title</h1>
    <p>The main content of your page goes here.</p>
      <p>More content</p>
      <p>More content</p>


  • Both the opening and closing tag are required.
  • Each <section> should be identified, usually by including a <h1> - <h6> element as a child. That being said, it would not necessarily make sense for all application or UI sections to have a heading.
  • If the content is a complete, or self-contained, composition it is recommended to use the <article> element instead.
  • If the content is used to hold indirectly-related but separate content to the document’s main content, such as sidebars, pull-quotes, and call-out boxes, consider using an <aside> element.
  • The <section> element is not a general container element. If the container is needed just for styling purposes then a <div> should be used. <section> elements should only be used if the contents would be listed explicitly in the document’s outline.


The Section element only supports the Global Attributes.

Best Practices

  • Assistive technology such as screen readers may announce a hint to users as to the type of content contained in the <section> element if an aria-label is specified. For example:
    <section aria-label="Red apples.">
      <h2>Red Apples</h2>
      <p>These red apples are delicious....</p>
    <section aria-label="Green apples.">
      <h2>Green Apples</h2>
      <p>These green apples are a little sour, but can be nice if eaten with....</p>


Browser Support




Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet