Loading Page Content...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
<h1> to <h6>)Welcome to Chapter 2: Heading & Paragraphs! 📰
Imagine picking up a morning newspaper like The Times of India or opening your Science textbook. What is the very first thing your eyes notice?
In HTML, we use Heading Tags to create clear titles and subtitles. Headings organize your webpage into neat sections so that readers and search engines (like Google) can understand what your page is about within seconds.
HTML gives us 6 levels of headings, ranging from <h1> down to <h6>:
<h1> produces the largest and boldest text on the page.1 to 6, the text size becomes progressively smaller.<h6> produces the smallest heading.To easily remember when to use which heading, think of your School Administration:
In the exact same way on a webpage:
<h1> is the Main Title of the entire page.<h2> defines the Main Sections.<h3> defines Subsections inside an <h2>.<h4> to <h6> are used for smaller sub-topics if needed.| Tag | Importance | Relative Size | Practical Example |
|---|---|---|---|
<h1> | Top Priority (Highest) | Largest | Main title of your article or website page |
<h2> | High | Large | Chapter title or major topic heading |
<h3> | Medium | Medium-large | Sub-topic under a chapter |
<h4> | Normal | Medium | Minor points or sidebar titles |
<h5> | Low | Small | Footer widget titles or fine print headings |
<h6> | Lowest Priority | Smallest | Rarely used; smallest sub-notes |
Here is how headings and paragraphs work together to create a structured school article:
Notice how clean, organized, and easy to read this structure is! Anyone reading this page can instantly understand the hierarchy.
To write clean, professional code that ranks high on Google, always follow these four rules:
<h1> Per Webpage ⚠️<h1> tag representing the primary topic of the document.<h1> like the title printed on the cover of a notebook. A notebook only has one main title on the cover!<h1> tags on one page confuses Google and hurts your SEO ranking.<h1> ➔ <h2> ➔ <h3><h1> ➔ <h4> (Do not jump directly from h1 to h4!)<h1> simply because they want some random sentence to look big.<p> and make it big with CSS styling or use <b> for bold text.<h1> or <h2> tag!<h7>, <h8>, or <h0>:<h1> to <h6>. There is no <h7> or <h0>.<h1> (highest) down to <h6> (lowest).<h1> per page for the main title.<h1> directly to <h3>).</h1>, </h2>).Test your understanding with these multiple-choice questions:
<h1> tags should you ideally use on a single webpage?<h1> or <h2> just to make text bold or big?index.html file.<body> and create a structured page about Your Favorite Sport:<h1> with the sport's name (e.g., Cricket: India's Favorite Sport).<h2> for Basic Rules.<h3> tags under it for Batting Rules and Bowling Rules with short paragraph explanations.<h2> for Famous Players.Ctrl + S) and check how neatly your browser displays the hierarchy! 🎯In the next lesson, we will continue your web development journey with Paragraphs & Line Breaks (Heading & Paragraphs).
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
| Previous Lesson | Next Lesson |
|---|---|
| Attributes | Paragraphs & Line Breaks |
Test your understanding of this lesson with 5 questions. Each question has one correct answer.