HTML Headings

HTML Headings

HTML Headings

HTML headings are titles or subtitles that you want to display on a webpage.

HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading.
<h6> defines the least important heading.

Example Headings

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
💡 Note: Browsers automatically add white space (margin) before and after a heading.

Why Headings Matter

🔍 Search engines use headings to index the structure and content of your page.
🧭 Users skim using headings, so structure your content with proper heading levels.

Use <h1> for main headings, followed by <h2>, then <h3>, and so on.

⚠️ Use headings only for titles — not just to make text big or bold.

Bigger Headings

You can change the heading size using inline CSS:

<h1 style="font-size:60px;">Heading 1</h1>

Heading 1


The Coding Journey provides high-quality, beginner-friendly, and advanced web development tutorials. Learn React, Next.js, JavaScript, Tailwind CSS, and more with hands-on projects. Build faster, code smarter, and level up your skills! 🚀

© 2025 All Rights Reserved | The coding journey