Headings and Paragraphs
Headings और Paragraphs
Headings — h1 to h6
<h1>Alpine Public School</h1>
<h2>Admissions 2026</h2>
<h3>Class 1 to 5</h3>
<h4>Documents Required</h4>
<h5>Photo Guidelines</h5>
<h6>Note</h6>
The Hierarchy Rule — what Google reads
- Exactly one <h1> per page — it tells Google the page's main topic. Two h1s = two "main topics" = confused ranking.
- Never skip levels going down: h1 → h2 → h3 is right; h1 → h4 (skipping 2,3) breaks the outline that screen readers and Google build.
- Never choose a heading for its size. Want smaller text? Use the correct level and resize with CSS later.
Paragraphs — and the br question
<p>Alpine Public School was established in Khurja.</p>
<p>It serves students from Nursery to Class 12.</p>
<p>Address line 1<br>
Address line 2<br>
PIN 203131</p>
Two <p> tags = two separate paragraphs with a visible gap. <br> = a line break inside the same paragraph — no gap. Rule: new thought → new <p>; same thought, forced new line (addresses, poems) → <br>. Using a chain of <br><br> to fake paragraph gaps is the classic beginner smell — don't.
The hr Tag — a thematic break
<p>Topic one ends here.</p>
<hr>
<p>A new topic begins.</p>
<hr> (horizontal rule) draws a divider line — HTML5 defines it as a "thematic break": the story is changing. Empty element, no closing tag.
The Whitespace Surprise
<p>Alpine Public
School</p>
is for (full entities chapter later).Headings — h1 से h6
<h1>Alpine Public School</h1>
<h2>Admissions 2026</h2>
<h3>Class 1 to 5</h3>
<h4>Documents Required</h4>
<h5>Photo Guidelines</h5>
<h6>Note</h6>
Hierarchy Rule — जो Google पढ़ता है
- हर page में exactly एक <h1> — यह Google को page का main topic बताती है. दो h1 = दो "main topics" = confused ranking.
- नीचे जाते हुए level कभी skip न करें: h1 → h2 → h3 सही; h1 → h4 (2,3 छोड़कर) वह outline तोड़ता है जो screen readers और Google बनाते हैं.
- Size देखकर heading कभी न चुनें. छोटा text चाहिए? सही level लगाइए, size बाद में CSS से.
Paragraphs — और br का सवाल
<p>Alpine Public School was established in Khurja.</p>
<p>It serves students from Nursery to Class 12.</p>
<p>Address line 1<br>
Address line 2<br>
PIN 203131</p>
दो <p> tags = दो अलग paragraphs, बीच में दिखता gap. <br> = उसी paragraph के अंदर line break — कोई gap नहीं. Rule: नई बात → नया <p>; वही बात, बस नई line चाहिए (addresses, कविताएं) → <br>. Paragraph gaps की नकल के लिए <br><br> की लड़ी लगाना classic beginner निशानी है — मत कीजिए.
hr Tag — thematic break
<p>Topic one ends here.</p>
<hr>
<p>A new topic begins.</p>
<hr> (horizontal rule) एक divider line खींचता है — HTML5 इसे "thematic break" कहता है: कहानी बदल रही है. Empty element, closing tag नहीं.
Whitespace वाला Surprise
<p>Alpine Public
School</p>
है (entities का पूरा chapter आगे).💻 Live Code Editor
इस पेज का code यहाँ तैयार है — बदलिए और तुरंत नतीजा देखिए. कुछ install किए बिना.console.log देखने के लिए F12 दबाइए.