What is the purpose of the <main> tag in HTML?


The main element represents the main content of the body of a document or application. -w3c

The <main> tag in HTML represents the central topic or core content of the document body. It is a semantic and structural element introduced in HTML5.

  <!-- Other content such as header, nav -->
    <!-- main content of the document body -->
  <!-- Other content such as footer -->

The <main> element is also useful for screen readers to skip the navigation and other irrelevant content and jump directly to the core content of the document.

A document should only contain a single <main> element.

Share and support us

Share on social media and help us reach more people