SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
HTML
1. HTML Introduction: What is HTML? Learn with Examples 2. Best Free HTML Editors: Notepad to VS Code for Beginners 3. HTML Basic Structure: Doctype, Head, Body Explained 4. HTML Elements Explained: Tags, Content & Empty Elements 5. HTML Attributes List: href, src, alt, width, title & More 6. HTML Headings h1 to h6: Which Heading Tag to Use When 7. HTML Paragraphs: p Tag, br Line Breaks & pre Text 8. HTML Style Attribute: Colour, Font Size & Alignment 9. HTML Text Formatting Tags: bold, italic, mark & More 10. HTML Comments: How to Add Notes & Hide Code in HTML 11. HTML Colors: Names, HEX, RGB & HSL Colour Codes 12. HTML CSS: Inline, Internal & External Stylesheets 13. HTML Links: a Tag, href, New Tab & Email Links 14. HTML Images: img Tag, src, alt, Width & Formats 15. HTML Favicon: Create & Add a Browser Tab Icon 16. HTML Title Tag: How to Write a Good Page Title 17. HTML Tables: table, tr, th, td, colspan & rowspan 18. HTML Lists: ul, ol, dl & Nested Lists Explained 19. HTML Block vs Inline Elements: div, p, span Explained 20. HTML Div Tag: Group Content & Build Page Layouts 21. HTML Class Attribute: Style Many Elements at Once 22. HTML id Attribute: Unique IDs, Links, CSS & JavaScript 23. HTML Iframes: Embed YouTube, Maps & Pages in HTML 24. HTML JavaScript: script Tag, Clicks & First Example 25. HTML File Paths: Relative vs Absolute Paths Explained 26. HTML Head Element: title, meta, charset & viewport 27. HTML Layout: header, nav, main, footer Page Structure 28. HTML Responsive Design: Viewport, Images & Media Queries 29. Semantic HTML Tags: header, nav, main, article & footer 30. HTML Forms: input, label, select, checkbox & Submit 31. HTML Entities: & < > © with Examples 32. HTML Audio & Video Tags: controls, source & Fallback 33. HTML Accessibility: alt Text, Labels, Landmarks & ARIA 34. HTML Meta Tags & SEO: charset, viewport, OG Tags 35. HTML Quotations: blockquote, q, cite, abbr & address
Final Test — Certificate ₹10
Try this code live
Lesson 6 of 35

HTML Headings h1 to h6: Which Heading Tag to Use When

3 min read · Free · No login needed

Headings give a page its structure. They tell the reader — and Google — what each section is about. HTML has six heading levels, from <h1> (the biggest and most important) to <h6> (the smallest).

Diagram — see how it fits together
Infographic: heading sizes from h1 to h6

How to use them

  • <h1> — the main title of the page. Use it only once per page.
  • <h2> — the main sections of the page.
  • <h3> — sub-sections inside an h2 section.
  • <h4> to <h6> — deeper sub-sections, used rarely.

Think of a book: h1 is the book title, h2 is a chapter, h3 is a section inside the chapter. Skipping levels — for example, jumping from h1 straight to h4 — confuses both readers and search engines.

Headings are not for big text

A common beginner mistake is using a heading tag only to make text big. Headings are about meaning, not size. If you want big text that is not a heading, use CSS to change the font size. Search engines give real weight to headings, so a page with a clear h1, h2, h3 structure ranks better than a page where every line is an h1.

Tip: When you write a blog or a tutorial page, write the headings first — like an outline. Then fill in the paragraphs under each one. Your writing becomes clearer automatically.

What each heading is for

Headings are the outline of your page, like the chapter titles of a book. <h1> is the book title — the most important heading, used once. <h2> marks the main chapters, <h3> marks sections inside a chapter, and so on down to <h6>. Search engines and screen readers use this outline to understand your page.

The six levels

TagSizeUse it for
<h1>largestThe main title of the page — only once per page.
<h2>largeMain sections, like chapters.
<h3>mediumSub-sections inside an h2 section.
<h4>smallerSmaller points inside an h3 section.
<h5>smallFine detail — rarely needed.
<h6>smallestFine detail — rarely needed.

A good outline looks like a staircase, going down one step at a time:

<h1>Computer Course</h1>
<h2>HTML</h2>
<h3>Tags</h3>
<h3>Attributes</h3>
<h2>CSS</h2>
Note: A heading is not a tool for making text big. If you want big text, use CSS — for example, style="font-size: 32px;" on a paragraph. Headings are for structure, and search engines treat them as a map of your page.
Tip: Before you write a long page, plan its headings first. If the headings alone tell the story of the page, your structure is good.

Common mistakes

  • Using more than one <h1> on a page — it confuses search engines about the main topic.
  • Skipping levels, like jumping from <h2> straight to <h4> — go one step at a time.
  • Using a heading just to make text bold or big — use CSS for the look instead.
  • Putting a whole paragraph inside a heading tag — headings are for short titles only.

Example explained

  • <!DOCTYPE html>, <html>, <head> and <title>Headings</title> — the usual page skeleton. The title shows on the browser tab.
  • <h1>Learn HTML</h1> — the main title of the page, the biggest heading. Use it only once per page.
  • <h2>Chapter 1: Basics</h2> — a main section, like a chapter in a book. It is smaller than h1.
  • <h3>What is HTML?</h3> — a sub-section inside the chapter. It is smaller than h2.
  • <h4>, <h5> and <h6> — smaller and smaller headings for deeper detail. They are used rarely, and h6 is the smallest heading HTML has.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Headings</title>
</head>
<body>

<h1>Learn HTML</h1>
<h2>Chapter 1: Basics</h2>
<h3>What is HTML?</h3>
<h4>A smaller heading</h4>
<h5>Even smaller</h5>
<h6>The smallest heading</h6>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Headings h1 to h6: Which Heading Tag to Use When

Try it yourself — live editor

Change the code below and press Run to see the result instantly. No file to save, no login needed.

Result

Frequently asked questions

The questions learners ask most about this lesson — read the question, then open it to see the answer.

1. How many heading levels does HTML have?

Six, from h1, the biggest and most important, to h6, the smallest.

2. How many times should I use h1 on a page?

Only once per page, for the main title. Using more than one confuses search engines about the main topic.

3. Can I use a heading just to make text big?

No. Headings are about meaning and structure, not size. Use CSS to change font size instead.

Why learn this yourself — and not just ask AI?

AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.

Get certified — just ₹10

Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test

Prefer watching? Video courses teach the same topics step by step.

Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

AI Prompt Engineering Webinar 2026
View
Ethical Hacking & Cyber Security Workshop
View
Website Design Using WordPress 3 Days (Basic to Advanced)
₹199
View
Browse all courses
HTML — Lessons
1. HTML Introduction: What is HTML? Learn with Examples 2. Best Free HTML Editors: Notepad to VS Code for Beginners 3. HTML Basic Structure: Doctype, Head, Body Explained 4. HTML Elements Explained: Tags, Content & Empty Elements 5. HTML Attributes List: href, src, alt, width, title & More 6. HTML Headings h1 to h6: Which Heading Tag to Use When 7. HTML Paragraphs: p Tag, br Line Breaks & pre Text 8. HTML Style Attribute: Colour, Font Size & Alignment 9. HTML Text Formatting Tags: bold, italic, mark & More 10. HTML Comments: How to Add Notes & Hide Code in HTML 11. HTML Colors: Names, HEX, RGB & HSL Colour Codes 12. HTML CSS: Inline, Internal & External Stylesheets 13. HTML Links: a Tag, href, New Tab & Email Links 14. HTML Images: img Tag, src, alt, Width & Formats 15. HTML Favicon: Create & Add a Browser Tab Icon 16. HTML Title Tag: How to Write a Good Page Title 17. HTML Tables: table, tr, th, td, colspan & rowspan 18. HTML Lists: ul, ol, dl & Nested Lists Explained 19. HTML Block vs Inline Elements: div, p, span Explained 20. HTML Div Tag: Group Content & Build Page Layouts 21. HTML Class Attribute: Style Many Elements at Once 22. HTML id Attribute: Unique IDs, Links, CSS & JavaScript 23. HTML Iframes: Embed YouTube, Maps & Pages in HTML 24. HTML JavaScript: script Tag, Clicks & First Example 25. HTML File Paths: Relative vs Absolute Paths Explained 26. HTML Head Element: title, meta, charset & viewport 27. HTML Layout: header, nav, main, footer Page Structure 28. HTML Responsive Design: Viewport, Images & Media Queries 29. Semantic HTML Tags: header, nav, main, article & footer 30. HTML Forms: input, label, select, checkbox & Submit 31. HTML Entities: & < > © with Examples 32. HTML Audio & Video Tags: controls, source & Fallback 33. HTML Accessibility: alt Text, Labels, Landmarks & ARIA 34. HTML Meta Tags & SEO: charset, viewport, OG Tags 35. HTML Quotations: blockquote, q, cite, abbr & address
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Please log in to download. You will stay on this page after logging in!

New here? Register now →