HTML <main> tag

Use of <main> tag

The <main> tag is new in HTML5. It is used to define a content in a document related to the main topic or content of that document. The content of the <main> element should be unique to a page. It should not be repeated across all pages.
For instance, in every websites, you see navigation bar, primary side-bar and footer elements etc. are repeated in all pages in that website. You should NOT use the <main> tag inside such repeated HTML elements like <artcicle>, <aside>, <footer>, <header>, <nav> etc.
Type: Block Level Element

Example of <main> tag

-----Content here----

Supported Browsers

The following versions are the minimum versions that support the <main> tag fully.

Tag Chrome browser Internet explorer browser Firefox browser Safari browser Opera browser
<main> 6.0 12.0 4.0 5.0 11.0

Full Code Example

<!DOCTYPE html>
<h1> Some most using Social media in India </h1>
<p> FaceBook, Twitter and Instagram are most using social media in India. </p>

<h3> FaceBook </h3>
<p> FaceBook is a social networking site that allows us to connect and share in different ways.</p>

<h3> Twitter </h3>
<p> Twitter is specially designed to broadcast short posts called tweets. </p>

<h3> Instagram </h3>
<p> Instagram is also social networking site mainly based on sharing photos and albums. </p>



HTML main tag