HTML main

<main> tag contains the content which is related to the central topic of the document or the content which is different across different pages(but header, sidebar and footer are always same on every page).


<h1>fundamental terms</h1>

 <p>It is the group of characters in the double qoutaion marks. String length means the no. of characters in a string. The operators perform operations on operands and do calculations</p>

Try </>

Tip: The main element should be used only once in a page.

Note: The main element should not be a child of other elements such as <article>, <section> and <aside> elements.

Tag omission

Both starting and ending tags are necessary for the main element.

Global Attributes

All the global attributes are applicable on the main element.

Was this article helpful?




Get the newsletter