<main>...</main>

HTML4 HTML5

Represents the main, unique content of the document[cite: 3]. Content inside this tag should be directly related to the central topic of the page and should not repeat across other subpages (it does not include site headers, navigation menus, or footers)[cite: 3].

Both opening and closing tags are mandatory[cite: 3].

Attributes: Universal attributes such as class, id, and style are mainly used[cite: 3].

Example

Code:

<main> <h1>Welcome to our website</h1> <p>This is the main content of the subpage, containing unique information for the user.</p> </main>

The browser will interpret this code as follows:

Welcome to our website

This is the main content of the subpage, containing unique information for the user.