HTML Tag Reference - HTML tag <main>








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

Browser compatibility

<main> Yes Yes Yes Yes Yes

What's new in HTML5

The <main> tag is new in HTML5.

Global Attributes

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

Event Attributes

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

Example

<!DOCTYPE html>
<html>
<body>
<!--from  w w  w. j  a  v  a2  s .  c om-->
<main>
  <h1>Heading</h1>
  <p>content.</p>

  <article>
    <h1>article heading</h1>
    <p>article content.</p>
  </article>


</main>

</body>
</html>

Click to view the demo