content logo

Learn HTML:

Html section tag

When writing in HTML, the <section> tag is a block element used to group thematically similar content together. Good examples are generic documents and application sections. As a general rule, <section> shouldn't be used if there is no natural <heading> for it. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Note: This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.

Example code

<section>
  <h1>Heading</h1>
  <p>Document content</p>
</section>

Example result

Heading

#HTML Section Example #HTML Section Code #HTML Section Tutorial