HTML Headings
Jab aap ek web page design karte ho, toh sabse important part hota hai content ka structure. Is structure ko dikhane ke liye HTML mein headings ka use kiya jaata hai.
HTML headings aapke page ko readable, SEO-friendly, aur well-organized banati hain.
Aaiye samajhte hain HTML headings kya hoti hain, kaise use hoti hain, aur inke different types.
HTML Headings Kya Hoti Hain?
HTML headings aise tags hote hain jo kisi content ko title ya sub-title ke form mein define karte hain.
HTML mein 6 types ke heading tags hote hain:
<h1>Sabse badi heading</h1> <h2>Thodi chhoti heading</h2> <h3>Usse bhi chhoti...</h3> <h4>...</h4> <h5>...</h5> <h6>Sabse chhoti heading</h6>
Heading Levels Explained
<h1>
: Sabse largest heading, ye page title ya main heading hoti hai.
<h2>
: Second largest heading, ye section ka title mein use hoti hai.
<h3>
: Sub-section ka title, ye sub-heading under <h2>
mein use hoti hai.
<h4>
, <h5>
, <h6>
: Chhoti headings, ye niche ke sections ke liye use hoti hain.
Note: Size CSS se change ho sakta hai, lekin structure same rahega.
Headings Ka Use Kab Aur Kaise Kare?
1. Page Title ke liye <h1>
Use karo
<h1>Welcome to My Blog</h1>
Yeh browser aur search engine dono ko batata hai ki yeh page ka main topic hai.
2. Content ko divide karo <h2>
aur <h3>
se
<h2>HTML Basics</h2> <p>HTML ka full form hoti hai HyperText Markup Language...</p> <h3>HTML Tags</h3> <p>Tags page ke elements define karte hain...</p>
Isse reader ko easily samajh aata hai ki content kis topic mein divided hai.
3. SEO ke liye headings important hain
Search engines jaise Google headings ko use karke samajhte hain ki page kis baare mein hai. Proper heading structure SEO ko boost karta hai.
Common Mistakes to Avoid
Multiple <h1>
ek hi page par mat rakho (unless you're confident with accessibility).
Sirf size ke liye headings mat use karo. Agar aapko bada font chahiye, toh CSS use karo:
.big-text {
font-size: 28px;
}
<p class="big-text">Yeh sirf bada text hai, heading nahi</p>
Example Code
<!DOCTYPE html>
<html>
<head>
<title>My HTML Learning Page</title>
</head>
<body>
<h1>HTML Tutorial</h1>
<h2>Introduction</h2>
<p>HTML is the foundation of web development...</p>
<h2>HTML Elements</h2>
<h3>Headings</h3>
<p>There are 6 levels of headings...</p>
<h3>Paragraphs</h3>
<p>Paragraphs are defined using the <code><p></code> tag.</p>
<h2>Conclusion</h2>
<p>HTML is simple but powerful...</p>
</body>
</html>
Output:
Conclusion
HTML headings sirf visual formatting ke liye nahi, balki structure, readability, aur SEO ke liye bhi bahut important hoti hain. Aap jab bhi koi blog, portfolio, ya business site banayein, toh headings ka proper use zarur karein.
Summary:
<h1>
sirf ek baar, page title ke liye<h2>
se sections divide karo<h3>
onwards sub-sections ke liye- Size ke liye CSS use karo, heading ka misuse mat karo
Comments