There are not just three types of headings but six levels of headings used in HTML, each represented by a heading tag from h1
to h6
.
Heading Levels and Their Uses
- h1: The most important heading, often used for the main title of a page. It should be used only once per page.
- h2: A secondary heading used for major sections within a page.
- h3: A tertiary heading used for subsections within a major section.
- h4: A quaternary heading used for smaller subsections within a section.
- h5: A quinary heading used for even smaller subsections.
- h6: The least important heading, used for the smallest subsections or for labeling lists or tables.
Example of Heading Usage
<h1>This is the Main Heading</h1>
<h2>Section 1</h2>
<p>This is the first section of the content.</p>
<h3>Subsection 1.1</h3>
<p>This is a subsection within Section 1.</p>
<h4>Subsection 1.1.1</h4>
<p>This is a smaller subsection within Subsection 1.1.</p>
Practical Insights
- Use headings to break up large blocks of text and improve readability.
- Use headings to create a hierarchy of information, making it easier for readers to understand the structure of your content.
- Use headings to help search engines understand the content of your page.