HTML main

HTML <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).

<main>
<h1>fundamental terms</h1>

<article>
 <h2>String</h2>
 <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>
</article>

</main>

</>

fundamental terms

String

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

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.

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.



Was this article helpful?

 

Email:

Message: