Hello, Dosto hume
ise pahale dekha ki html program ka structure ka hota hai. Aur html program
kaise banate hai.To aaj hum ye janenge ki html me paired tag aur unpaired tag
kya hoti hai.
Html Tag:
Html tag ka
predefined meaning hota hai yane agar hum tag use karte hai to browser ko uska
meaning pata hota hai. Html me yese 2 prakar ke tag hote hai.
1. Paired tag
2. Unpaired tag/
Singular tag:
1. Paired tag:
Paired tag wo tag
hota hai jiska opeaning tag aur closing tag hota hai.
Opeaning
tag: Opeaning tag wo hota hai jise hum
<tag ka naam> brases me use karte hai.
Closing
tag: Closing tag wo hota hai jise hum
</tag ka naam> brases aur “/” back slash ke bich me use karte hai.
Syntax Paired tag Ka :
<Opening tag> jo text likhana hai wo </closing tag>
Example:
<h1> heading
</h1>
<b> bold tag
</b>
<i> Italic
tag</i>
Paired tag ka example:
Output:
2. Unpaired tag:
Unpaired tag wo tag
hota hai jiska closing tag nahi hota. Unpaired tag ko singular tag bhi kaha
jata hai.
Aur Stand-alone tag
bhi kaha jata hai.
Html me bahut hi
kum unpaired tag hai. Niche unpaired tag ki list di gayi hai.
1. <br> Ye
tag break tag hai. Html me agar aapko new line pe kuch likhana hai to phir
<br> tag ka use karana padata hai.
e.g. <p>
Paragraph </p> <br>
2. <hr> Ye
tag horizontal tag hai. Html me agar aapko horizontal line draw karani hai to
phir <hr> tag ka use karana padata hai.
e.g. <hr>
Paragraph </hr>
3. < img
src=“”> Ye tag image display karane ke liye use karate hai.
Agar hume images use karni hai to hume <img
src=”image location”> is tag ka use karana padega.
Image tag ke
different attributes hote hai jaise alt, src, width, height, border, title, align
etc.
Hum in eke k
attributes ka use dekhate hai.
Src= source yane aapki image kaha save hai
wo path aapko yaha dena padata hai. Jaise <img
src=”d:umesh/my_photo.jpg”>
Alt= alternative tag jab aapki image proper
load nahi hoti hai tab alt text waha pe dikhayi dega. <img
src=”d:umesh/my_photo.jpg” alt=”my photo”>
Width,
height= Iski madad se hum
image ki size set kar sakate hai.
Title= aap image ko title de sakate hai.
Border= Image ko border de sakate hai.
Align= image ko alignment de sakate hai jaise
left, right, center yese.
<img src= img
src=”d:umesh/my_photo.jpg” title=”image” alt=”my photo” width=”200”
height=”200” border=”2” align=”center”>
Unpaired tag ka
example:
Output:
Aasha karata hu
dosto ki aapko ye article accha laga hoga. Agar koi problem ho to niche comment
karana na bhule.
0 Comments: