HTML <main> Tag


  <h2>Web Browsers</h2>
  <p>Chrome, Firefox, and Edge are the most used browsers today.</p>

    <h3>Google Chrome</h3>
    <p>Chrome is a free, open-source web browser developed by Google, released in 2008.</p>

    <h3>Microsoft Edge</h3>
    <p>Edge is a free web browser from Microsoft, released in 1995.</p>

    <h3>Mozilla Firefox</h3>
    <p>Firefox is a free, open-source web browser from Mozilla, released in 2004.</p>
Try it Yourself »

Definition and Usage

The <main> tag specifies the main content of a document.

The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.

Note: There must not be more than one <main> element in a document. The <main> element must NOT be a descendant of an <article>, <aside>, <footer>, <header>, or <nav> element.

Browser Support

The numbers in the table specify the first browser version that fully supports the element.

<main> 26.0 12.0 21.0 7.0 16.0

Differences Between HTML 4.01 and HTML5

The <main> tag is new in HTML5.

Global Attributes

The <main> tag also supports the Global Attributes in HTML.

Event Attributes

The <main> tag also supports the Event Attributes in HTML.