📘 DAY 6: HTML HEADINGS
1️⃣ What are HTML Headings?
HTML Headings are used to define titles and subtitles on a webpage.
HTML provides six heading levels:
<h1>→ Most important heading<h6>→ Least important heading
2️⃣ List of HTML Heading Tags
| Tag | Description |
|---|---|
<h1> | Main heading |
<h2> | Sub-heading |
<h3> | Section heading |
<h4> | Sub-section |
<h5> | Smaller heading |
<h6> | Smallest heading |
3️⃣ Basic Example of Headings
4️⃣ Output of Headings
<h1>appears largestSize decreases gradually till
<h6>
👉 Browsers apply default styles to headings.
5️⃣ Importance of HTML Headings
Headings are important for:
Page structure
Readability
SEO (Search Engine Optimization)
Screen readers (Accessibility)
6️⃣ SEO Rules for Headings (VERY IMPORTANT)
✔ Use only one <h1> per page
✔ <h1> should contain main keyword
✔ Use <h2> for major sections
✔ Use <h3> for sub-sections
❌ Wrong SEO Practice
✅ Correct SEO Practice
7️⃣ Headings vs Normal Text
Headings:
Are bold by default
Have margin (space)
Carry semantic meaning
Normal text:
👉 Do not use headings just to make text big.
8️⃣ Styling Headings Using CSS
You can change heading appearance using CSS.
👉 Structure comes from HTML
👉 Style comes from CSS
9️⃣ Headings and Accessibility
Screen readers use headings to navigate
Correct heading order improves accessibility
✔ Always follow proper order:
🔟 Common Beginner Mistakes
❌ Skipping heading levels (h1 → h4)
❌ Using headings for styling only
❌ Multiple <h1> tags
❌ No headings on page
1️⃣1️⃣ Practice Example
1️⃣2️⃣ Interview / Viva Questions
What are HTML headings?
How many heading tags are there?
Which is the most important heading?
Can we use multiple
<h1>tags?Why are headings important for SEO?
1️⃣3️⃣ Summary
HTML provides 6 heading tags
<h1>is most importantHeadings define page structure
Important for SEO & accessibility
0 comments:
Post a Comment