HTML main tag is used to specify the main content of the web page.
The main tag can be used only one time in a single web page.
Syntax
1 |
<main>Put main content here</main> |
1 2 3 4 5 6 7 8 |
<main role="main"> <article> <h3>First heading</h3> <p>Your first paragraph content will go here.</p> <h3>Second heading</h3> <p>Your second paragraph content will go here. </p> </article> </main> |
Output
First heading
Your first paragraph content will go here.
Second heading
Your second paragraph content will go here.
You should also read:
- HTML article tag
- and HTML anchor tag
Resources and References of HTML main tag
1. W3C Specification.
2. HTML living standard
3. W3C project using Github