Headings in HTML

Headings in HTML titles ya subtitles hote hain jo aap webpage par display karna chahte ho.

Example:

Headings in HTML


HTML Headings

Headings in HTML <h1> se <h6> tags se define hoti hain.

<h1> sabse important heading hoti hai.
<h6> sabse kam important heading hoti hai.

Code:

HTML Headings

Note: Browser automatically heading ke pehle aur baad thoda white space (margin) add karta hai.


Headings itna important kyu hote hai?

Search engines headings ka use karte hain page ki structure aur content ko samajhne ke liye. Users bhi page ko jaldi samajhne ke liye headings ko skim karte hain. Isliye document ki proper structure dikhane ke liye headings use karna important hai.

Structure ka sahi order:

  • <h1> → Main heading
  • <h2> → Section headings
  • <h3> → Sub-sections
  • aur aise hi aage

Example:

Examples of Heading in HTML


Bigger Headings

Har HTML heading ka ek default size hota hai. Lekin aap style attribute aur CSS ke font-size property se size change kar sakte ho.

Bigger Headings

Leave a Comment