Summary -

In this topic, we described about the <main> tag along with detailed example.

The <main> tag is new in HTML5. Main content area in HTML documents. The <main> tag represents the main content area in HTML document.

The <main> tag is the first or top level tag for the content. The <main> tag is unique for the single page and should not contain more than one per page.

The tag can be specified like <main></main> with the main content in between the opening and closing tags. Normally the other HTML elements of body content will be included in between <main></main> tags.

Syntax -

<li>HTML text here </li>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>LIST tag example.. </title>
	</head>
	<body>
		<main>
			<h6> Ordered list: </h6>
			<ol>
				<li>Monday</li>
				<li>Tuesday</li>
				<li>Wednesday</li>
				<li>Thursday</li>
				<li>Friday</li>
				<li>Saturday</li>
				<li>Sunday</li>
			</ol>
			<h6> UnOrdered list: </h6>
			<ul>
				<li>Monday</li>
				<li>Tuesday</li>
				<li>Wednesday</li>
				<li>Thursday</li>
				<li>Friday</li>
				<li>Saturday</li>
				<li>Sunday</li>
			</ul>
		</main>
	</body>
</html>

Output -

Ordered list:
  1. Monday
  2. Tuesday
  3. Wednesday
  4. Thursday
  5. Friday
  6. Saturday
  7. Sunday
UnOrdered list:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday