SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 6 of 30

HTML Headings

2 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).

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.

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
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

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

Take the test
Go further with a full course

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

AI Power Skills in 2 Days | Learn AI Text, Image, Video and Voice Tools
View
Ethical Hacking & Cyber Security Workshop
View
Android & iOS App Development using Flutter 2026
₹5,000
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
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...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →