Paragraphs in HTML

Paragraphs in HTML hamesha new line se start hota hai, aur usually ek block of text hota hai.


HTML <p> Element

Paragraphs in HTML define karne ke liye <p> tag use hota hai. Browser automatically paragraph ke pehle aur baad thoda white space (margin) add kar deta hai.

Example:

Paragraphs in HTML


HTML Display

Aap 100% sure nahi ho sakte ki HTML har device par same dikhega.

  • Screen chhoti ya badi ho sakti hai
  • Window resize ho sakti hai
  • Different devices, different display

HTML me agar aap extra spaces ya extra lines daloge code me, toh browser unhe ignore kar deta hai.

HTML Display

Dono paragraph the same way print hogayenge.


HTML Horizontal Rules

<hr> tag ek thematic break define karta hai, usually ek horizontal line ke form me dikhta hai. Content ko separate karne ke liye use hota hai.

Example:

HTML Horizontal Rules

Note: <hr> ek empty tag hai. Iska koi closing tag nahi hota.


HTML Line Breaks

<br> tag ek line break deta hai, new line start karta hai bina naya paragraph banaye.

Example:

HTML Line Breaks


<pre> Element

<pre> tag preformatted text show karta hai.

Iske andar:

  • Spaces preserve hote hain
  • Line breaks preserve hote hain
  • Fixed-width font (usually Courier) use hota hai

Example:

pre Element

 

Leave a Comment