Using Headings
suggest changeHeadings can be used to describe the topic they precede and they are defined with the <h1> to <h6> tags. Headings support all the global attributes.
<h1>defines the most important heading.<h6>defines the least important heading.
Defining a heading:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Correct structure matters
Search engines and other user agents usually index page content based on heading elements, for example to create a table of contents, so using the correct structure for headings is important.
In general, an article should have one h1 element for the main title followed by h2 subheadings, going down a level if necessary. If an h1 is already used for a higher-level title, don’t use another h1 for a subsection.
Example document (extra indentation to illustrate hierarchy):
<h1>Main title</h1>
<p>Introduction</p>
<h2>Reasons</h2>
<h3>Reason 1</h3>
<p>Paragraph</p>
<h3>Reason 2</h3>
<p>Paragraph</p>
<h2>In conclusion</h2>
<p>Paragraph</p>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents