📝 Chapter 6: Using <h1> to <h6> Tags in HTML
HTML provides six levels of headings, from <h1> to <h6>. These heading tags help define the structure of your content, where <h1> is the most important and <h6> is the least.
✅ Example: Heading Tags in Action
🔍 Explanation
| Tag | Meaning | Font Size (Default) |
|---|---|---|
<h1> |
Most important heading (biggest) | 2em |
<h2> |
Second level heading | 1.5em |
<h3> |
Third level heading | 1.17em |
<h4> |
Less important than <h3> |
1.0em |
<h5> |
Smaller heading | 0.83em |
<h6> |
Least important heading (smallest) | 0.67em |
📚 Important Points
-
All six heading tags are predefined and supported by all major browsers.
-
These are block-level elements (each starts on a new line).
-
Heading tags also carry semantic meaning, so
<h1>should be used for the main title of the page. -
Never use headings just to make text bold or large. Use them to structure your content meaningfully.
🧠 SEO Tip
Search engines give more importance to text inside <h1> and <h2> tags. Use them wisely for better search engine optimization (SEO).
