In this section, we will learn what HTML <main> element is and how to use it.
What is <main> Tag in HTML?
HTML <main> element is used to group the main content of a document.
In a typical webpage, you see a sidebar, navigational bar, footer and a part where the main content of that document is.
This main content in a document, first of all, is in the body of that document and secondly is the most related part to the title of that webpage. It can contain one or more <article> with paragraphs in it, headers (<h1> – <h6>) and any other necessary parts related to the main title of that document.
HTML <main> Tag Syntax:
<main> Main content of a document </main>