HTML Section Tag

In HTML5, if you want to divide your document into several sections for clear understanding than for that purpose <section> tag is used.

  • <section> tag is used to represent the stand-alone section in a document; either in header, footer or in any other part of the document.

  • One can also create a section within a section by the nesting of <section> tag. A Section within a section is known as a subsection.

  • <section> tag is a semantic element that is an element whose meaning is described to the browser as well as to the developer.

  • Also, this is a Block-Level element.

HTML5 <section> tag - Syntax and Usage

The <section> tag requires the start(opening) tag and end(closing) tag. Basic syntax of <section> tag is given below:

<section>
...content here
</section>

HTML5 <section> Tag Basic Example:

Below we have an example showing the basic usage of section Tag:

Example: For the Usage of section inside a section:-

Placing <section> tag inside <section> tag is known as the Nesting of Section elements. The font size of the subsection is smaller than the section if the text contains the same font property.

Default CSS Settings for HTML5 <section> tag

Given below are the default CSS settings used by most of the browsers for the HTML <section> tag:

section {
  display: block;
}

Browser Support for HTML5 <section> tag

Following browsers support this attribute:

  • Google Chrome 9.0

  • Internet Explorer 11.0

  • Firefox 4+

  • Opera

  • Safari