1 – HTML Elements and Tags kya Hote Hain ?
HTML Elements: HTML element ek basic building block hai web page ka. Yeh ek content ko define karta hai jo browser mein display hota hai. Har element ka ek starting tag, kuch content aur ek ending tag. Example ke liye:
<h1>Hello World</h1>
Yahaan <h1> ek element hai jo heading ko define karta hai.
HTML Tags: HTML tag ek keyword hota hai jo angle brackets (< >) ke andar likha jata hai. Tags content ko identify karte hain, jise browser ko bata sake ke kis type ka content dikhana hai. Tags do types ke hote hain:
- Closing Tag: Yeh tag content ke end hone par use hota hai. Jaise ki </p> ka tag.
- Opening Tag: Yeh tag content ke shuru hone par use hota hai. Jaise ki <p> ka tag.
<p>This is a paragraph</p>
Yahaan <p> tag ek paragraph ko define karta hai aur </p> uske end ko.
Self-Closing Tags: Kuch tags aise hote hain jo khud hi close ho jate hain aur unhe end tag ki zarurat nahi hoti. Jaise <img>, <br>, <hr>.
2 – HTML Attributes Kya hote hain?
HTML Attributes web page elements ke behavior ya appearance ko modify karne ke liye use hote hain. Ye attributes HTML tags ke andar specified hote hain aur unke values set karte hain. Har HTML element ke paas kuch specific attributes ho sakte hain, jo us element ke functionality ko customize karte hain.
HTML Attribute ka Structure:
HTML attributes element ke opening tag ke andar likhe jaate hain, aur attribute ka naam aur uski value ke beech “=” hota hai. Example:
<a href="https://www.example.com">Visit Example</a>
Yahaan:
- <a> ek anchor tag hai.
- href ek attribute hai, jo link ka URL define karta hai.
- https://www.example.com is attribute ka value hai.
3 – HTML Headings (<h1> to <h6>) kya hote hain?
HTML Headings tags (<h1> se <h6>) web page par content ko organize karne ke liye use hote hain. Yeh tags headings ya sub-headings ko define karte hain, jise aap content ko structured aur readable bana sakte hain. Har heading tag ka apna ek importance hota hai, aur yeh SEO (Search Engine Optimization) me bhi kaafi important hote hain.
HTML mein headings tags ka range hota hai, jo <h1> se lekar <h6> tak jaata hai. Jitne chhote number wali heading, utni zyada important hoti hai. Aur jitna bada number, utni zyada sub-heading ya less important heading hoti hai.
<h1>Heading Level 1</h1> (bigger in size)
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6> (smaller in size)
4 – HTML Paragraphs tag kya hota hai?
Paragraphs tag (<p>) text ko paragraph ke roop mein display karne ke liye use hota hai. Jab aapko kisi content ko ek paragraph ke format mein dikhana ho, to aap <p> tag ka use karte hain. Ye tag text ko ek block-level element bana deta hai, aur automatically text ke beech ek space (line break) create karta hai.
<p>This is a paragraph.</p>
5 – HTML Line Breaks (<br>) Tag kya hota hai?
<br> tag ka use ek line break insert karne ke liye hota hai. Jab aapko bina naya paragraph (<p>) banaye, sirf ek new line create karni ho, tab aap <br> tag ka use kar sakte hain. <br> tag ek self closing tag hai.
<p>This is the first line.<br>This is the second line.</p>
Output:
This is the first line.
This is the second line.
<br> ka use tab karein jab ek hi paragraph ke andar new line chahiye.
6 – HTML Horizontal Rules (<hr>) kya hota hai?
(<hr>)tag ka use ek horizontal line (divider) insert karne ke liye hota hai. Ye ek visual separator provide karta hai, jo content ko logically alag dikhane me madad karta hai.
<hr> ek self-closing tag hai, yani iska koi closing tag (</hr>) nahi hota.
<p>This is the first section.</p>
<hr>
<p>This is the second section.</p>
Output:
This is the first section.
――――――――――――
This is the second section.
7 – HTML Comments (<!– –>)
HTML Comments ka use code ke andar notes likhne ke liye hota hai, jo browser me visible nahi hote. Ye comments sirf developers ke liye helpful hote hain, jisse code ko samajhna aur manage karna easy ho jata hai.
<!-- This is a comment -->
Yeh comment browser me show nahi hoga, sirf HTML source code me visible hoga.
<p>This is visible content.</p>
<!-- This is a comment -->
<p>This is another visible content.</p>
Output:
This is visible content.
This is another visible content.
Quiz: Test Your Knowledge on Basic HTML Tags
Bonus: Practical Application!
Try Adding Basic HTML Tags to Your Webpage Today!
Choose tags like <h1>, <p>, <hr>, and <br>, and structure your content for better readability.