<main> tag in HTML5
The <main> tag is used to represents the major content of a document. We can use only one <main> tag in a HTML web page.
The <main> element should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.
Important Definition
- The <main> tag is new in HTML5.
- The content of a <main> element should be unique to the document.
- The <main> element must NOT be a descendant of an <article>, <aside>, <footer>, <header>, or <nav> element.
- Open and close tag required of <main>.
Example of <main> tag
<main> Tag Browser Support
Element |
Chrome |
Edge |
Firefox |
Safari |
Opera |
Internet Explorer |
<main> |
Yes |
Yes |
Yes |
Yes |
Yes |
Not Supported |
Version |
6.0 |
12.0 |
4.0 |
5.0 |
11.1 |
Not Supported |
Global Attributes
Event Attributes