Basic HTML Tags Ko Detail Me Samjhein
Web Development ki shuruaat in foundational tags se karein.
HTML Elements aur Tags Kya Hain?
HTML me, tags angle brackets (< >) me likhe jaate hain, jaise <p>. Ek element ek opening tag, content, aur ek closing tag se milkar banta hai. For example, <p>This is a paragraph.</p> ek complete paragraph element hai.
Heading Tags (<h1> to <h6>)
Heading tags ka use content ko sections me divide karne aur unhe titles dene ke liye hota hai. <h1> sabse important heading hoti hai (jo aamtaur par page title ke liye use hoti hai), aur <h6> sabse kam important.
<h1>Main Heading</h1>
<h2>Sub-heading</h2>
<h3>Smaller sub-heading</h3>Main Heading
Sub-heading
Smaller sub-heading
Paragraph Tag (<p>)
<p> tag ka use text ke paragraphs banane ke liye hota hai. Browser automatically paragraphs ke beech me thoda space add kar deta hai.
<p>Yeh ek paragraph hai.</p>
<p>Yeh doosra paragraph hai.</p>Yeh ek paragraph hai.
Yeh doosra paragraph hai.
Line Break Tag (<br>)
Agar aapko paragraph ke andar ek nayi line shuru karni hai, toh <br> tag ka use karein. Yeh ek empty tag hai, iska closing tag nahi hota.
<p>Pehli line.<br>Yeh doosri line hai.</p>Pehli line.
Yeh doosri line hai.
Horizontal Rule Tag (<hr>)
<hr> tag ka use content ko aapas me separate karne ke liye ek horizontal line banane ke liye hota hai. Yeh bhi ek empty tag hai.
<p>Upar ka content.</p>
<hr>
<p>Niche ka content.</p>Upar ka content.
Niche ka content.
HTML Comments (<!-- ... -->)
Comments ka use code ke baare me notes likhne ke liye hota hai. Yeh browser me display nahi hote. Comments code ko samajhne me madad karte hain.
<!-- Yeh ek comment hai -->
<p>Yeh browser me dikhega.</p>Key Takeaways
- Headings (
<h1>-<h6>) content ko structure deti hain. - Paragraphs (
<p>) text ke blocks banane ke liye use hote hain. <br>ka use line break ke liye aur<hr>ka use content separation ke liye hota hai.- Comments (
<!-- ... -->) code ko explain karne me help karte hain.
Ek heading, ek paragraph, aur ek horizontal rule banakar practice karein.
Practice in HTML EditorApni knowledge test karne ke liye is quick quiz ko dein.
Start Quiz