HTML heading - how to use <h1> to <h6> tag

The HTML <h1> to <h6> tags are used to define a heading for the document, section or article. The different number tags - h1 to h6 - defines 6 different level of headings. The different headings should be used ordered by relevance - the most important should be <h1> and the least important should be <h6>. It is not necessary for a document to contain all the different heading, however, it should at least contain a <h1> heading.


The tag supports the global and event attributes.


<body> <h1>Main Demo</h1> <p>some content</p> <h2>Another demo</h2> <p>some content</p> </body>