Topic: HTML Basics

main element – HTML


  <!-- main content of web page goes here -->
  <h1>Your Business</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.</p>


The main element wraps around the main content of a web page. The main content of a web page is the parts of the page that are unique to it.

Elements that are repeated across multiple web pages, such as navigation menus and footers, should not be included inside the main element.

Generally speaking, you should only have one main element per web page. (To be more specific, a “document must not have more than one main element that does not have the hidden attribute specified,” according to the HTML Standard.)



main on MDN