HTML5 > Elements of HTML

Main in HTML5

How to use main tag in HTML5?


Main

The HTML <main> tag is used to represent the main content area within an HTML document.

<html>
<head><title>Title</title></head>
<body>
<h2 style="color:green">Main tag is used to define the main content in the HTML document</h2> <main> <h2>Techfunda</h2> <p>It is online tutorials for the beginners </p> </main>
</body>
</html> 

In the above code snippet we have defined the main tag which defines the main content of the page 

  • h1 - It defines the headings tag
  • p - It defines the paragraph

output


 Views: 3929 | Post Order: 32



Write for us






Hosting Recommendations