Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

HTML | <main> Tag

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The HTML <main> Tag is used to given the main information of a document. The content inside the <main> element should be unique for the document. Which includes the sidebars, navigation links, copyright information, site logos, and search forms. 
Note: The document must not contained more than one <main> element . The <main> element should not be a child elements of an <article>, <aside>, <footer>, <header>, or <nav> element. 

    //contents of main Element 



<!DOCTYPE html>
        .class {
            color: green;
    <h1 class="class">&lt;Main&gt; Tag</h1>
        <h1>Programming Languages</h1>
        <p>c programming, C++
          Programming, Java Programming</p>
            <h1>C Programming</h1>
            <p>C is a Procedural language</p>
            <h1>C++ Programming</h1>
            <p>C++ programming is a
              Object oriented Programming.</p>
            <h1>Java Programming</h1>
            <p>Java is a pure Object
              oriented Programming.</p>


Supported Browsers: The browsers supported by <main> Tag are listed below: 

  • Google Chrome 26
  • Edge 12
  • Firefox 21
  • Apple Safari 7
  • Opera 16


My Personal Notes arrow_drop_up
Last Updated : 26 Jul, 2022
Like Article
Save Article
Similar Reads
Related Tutorials