Aral Code

Text Lesson 6 of 42

HTML Headings (h1 to h6)

How to use HTML headings h1 to h6 correctly, why heading order matters for Google and screen readers, and common mistakes students make.

Headings are the titles and subtitles of your page. They help readers scan quickly, and they help Google understand what each part of your page is about. HTML gives you six levels, from <h1> (most important) down to <h6> (least important).

The six heading levels

Example h1 to h6
<h1>Heading 1 – Main title</h1>
<h2>Heading 2 – Section</h2>
<h3>Heading 3 – Subsection</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

By default, browsers show <h1> the biggest and <h6> the smallest, all in bold. But size is not the reason to choose a heading level. The level shows how important the heading is and where it sits in the outline of your page.

Headings are an outline

Think of how you write a research paper or a report in school. There is one title, then main parts (I, II, III), and each part can have smaller sub-parts (A, B, C). Headings work exactly the same way:

Example A page about Philippine festivals
<h1>Philippine Festivals</h1>

<h2>Festivals in Luzon</h2>
<h3>Pahiyas Festival – Lucban, Quezon</h3>
<p>Houses are decorated with colorful rice wafers called kiping.</p>
<h3>Panagbenga – Baguio City</h3>
<p>Also called the Flower Festival, held every February.</p>

<h2>Festivals in the Visayas</h2>
<h3>Sinulog – Cebu City</h3>
<p>Held in honor of the Santo Niño every January.</p>
<h3>MassKara – Bacolod City</h3>
<p>Famous for its smiling masks.</p>

<h2>Festivals in Mindanao</h2>
<h3>Kadayawan – Davao City</h3>
<p>A celebration of harvest, culture and nature.</p>

If you removed all the paragraphs and kept only the headings, you would still understand how the page is organized. That's how you know your headings are doing their job.

Rules for good headings

  1. Use one <h1> per page. It's the main title — usually the same idea as the page's <title>.
  2. Don't skip levels going down. After an <h2>, the next smaller heading should be <h3>, not <h5>. Going back up (from <h3> to a new <h2>) is fine.
  3. Don't use headings just to make text big or bold. If it's not a title of a section, use a paragraph and style it with CSS later.
  4. Keep them short and clear. A heading is a label, not a full sentence.

Why headings matter

For screen reader users

People who are blind or have low vision use programs called screen readers that read the page aloud. Many of them jump from heading to heading to find what they need, the same way you scan with your eyes. Good heading levels make your page usable for them.

For search engines

Google reads your headings to understand the topics on your page. Clear headings with the words people search for (like "How to compute GWA") help your page show up in results.

For every reader

Most people don't read web pages word for word — they skim. Headings let them find the part they need in seconds.

Changing heading size (a preview of CSS)

If you want an <h2> that looks smaller or a different color, you don't switch to <h4>. You keep the correct level and use the style attribute or CSS:

Example Same level, different look
<h2>Normal h2</h2>
<h2 style="font-size: 18px; color: teal;">A smaller, teal h2</h2>

You'll learn proper styling in the Styles lesson.

Horizontal rules between sections

Sometimes you want a visible break between sections. Use <hr> (horizontal rule). It draws a line and also tells the browser there's a change in topic.

Example hr between topics
<h2>Class Announcements</h2>
<p>No classes on Friday because of the school foundation day.</p>
<hr>
<h2>Club Announcements</h2>
<p>Coding Club meets every Wednesday at the ICT lab.</p>

Quick Quiz

Check what you learned. Walang grade ito, practice lang. 🙂

1. How many <h1> headings should a normal page have?
2. After an <h2>, which heading should come next for a subsection?
3. You want a heading to look smaller. What should you do?
4. Who benefits from good heading structure?

By Sir Reyel · Last updated 2026-12-04