HTML provides six heading levels (<h1> to <h6>) to create a clear content hierarchy on a web page. A good outline helps readers scan quickly and helps search engines and assistive technologies understand the structure and importance of each section.
<h1>: Page title or main heading (use once per page in most cases).<h2>: Main sections under the title.<h3>: Subsections under an h2, and so on.<h4>–<h6>: Deeper levels for large or highly structured documents.Headings work like chapters and sub-chapters in a book. A logical order (h1 → h2 → h3…) creates a clear content tree, improves readability, and makes it easier to scan long pages.
Use one descriptive <h1> per page and then organize sections with <h2>, <h3>, etc. A clear hierarchy sends better topic signals to search engines and improves scannability for users.
Screen reader users often navigate by headings. Keep the order logical and avoid skipping levels (for example, don’t jump from h1 directly to h4) so keyboard and assistive-tech users can move through sections easily.
A practical heading hierarchy for a travel blog could look like this:
<h1>My Travel Blog</h1>
<h2>Top Destinations</h2>
<h3>1. Paris</h3>
<h4>Best Time to Visit</h4>
<h4>Things to Do</h4>
<h3>2. Tokyo</h3>
<h4>Food Experiences</h4>
<h4>Cultural Spots</h4>
<h2>Travel Tips</h2>
<h3>Packing List</h3>
<h3>Budgeting Tips</h3>
Visually, the browser renders each heading with different default sizes and weights, making the hierarchy obvious. Semantically, assistive tools and search engines understand that everything nests under the main <h1> “My Travel Blog”.
You can style headings with CSS instead of using extra heading levels only for visual size differences.
<style>
h1 {
color: navy;
text-align: center;
font-size: 36px;
}
h2 {
color: darkred;
font-size: 28px;
}
</style>
<h1> as the main page heading; build sections with <h2> and <h3>.h1, at least two h2, and some h3 subsections.HTML headings define the structure and hierarchy of your content. Using <h1> through <h6> in a logical order improves readability, SEO, and accessibility. Style headings with CSS rather than misusing levels for visual size, and always think of headings as the outline of your page.