Table of Contents
HTML Attributs in hindi
HTML के सभी Element में attributes होते ही है,वह attributes Element में addinational information बताते है|
HTML, Element के <opening> tag ,</closing> tag होते है तो हम इन attributes को <opening> tag में लिखते है|
attributes को elements में बताने के लिए उसका basic syntax (Name = “value”) कुछ इस तरह होता है|
Example.
<p title ="daily hunt">this is a rjtechyg </p>
<body>Element के कुछ important attribute
link attribute body element के अंदर में जितने बी link है इन सभी link का color सेट करने के लिए .
alink attribute body element के अंदर में जितने बी active link है इन सभी active link का color सेट करने के लिए.
vlink attribute body element के अंदर में जितने बी visited link है इन सभी visited link का color सेट करने के लिए.
bgcolor attribute body element के background में color सेट करने के लिए.
background attribute body element के background में color, image सेट करने के लिए.
<body align="center" alink="red" vlink="green" link="orange" text="title" bgcolor="#eee" background="data-url">
<a href="#">testing nom1</a><br>
</body>
<img> Element के कुछ important attribute
src <img> element में src attribute images के image path defind करता है.
width <img> element में width attribute images के width सेट करने के लिए.
Height <img> element में Height attribute images के Height सेट करने के लिए.
alt <img> element में alt attribute images किसी कारन छे load नहीं होती या दूसरे वजह छे image show nahi होती है तो उसकी जगह वह alt की value viewer को show होती है|
<img src="img.jpg" alt="images view" width="500" height="600">
The lang attribute
lang attribute को element में define किया जाता है. lang attribute webpage के language declared करता है
<!DOCTYPE html> <html lang="en"> <body>this is web page body</body> </html>
lang attribute में country code बी add किया जाता है. language code और country code को declared करने लिए language के first two characters और country name के first two characters का उपयोग किया जाता है.
<!DOCTYPE html>
<html lang="en-US">
<body>this is web page body</body>
</html>
The href attribute
href (hyperlink ) attribute <a> tag में defind किया जाता है , href attribute tag में url specified करता है जिसे की हमे page की link set कर सकते है|
<a href="exaple.php">click here</a>
The style attribute
style attribute का उपयोग elemet में css की style add करने के लिए होता है , जैसे की color , font size जैसी style add करने के लिए.
<p style="color:green;font-size:20px">This is a green paragraph.</p>
The title attribute
title attribute Elements में additional information provide करता है| title attribute की value element पे mouse hover करने छे show होता है.
<p title="for the title testing">This is a paragraph.</p>
The most important note about attribute
Attribute का title हम lowercase और uppercase दोनों मई लिख सकते है जैसे की title और TITLE
<p title="for the title testing">This Attribute का title lowercase के साथis a paragraph.</p>
OR
Attribute का title uppercase के साथ
<p TITLE="for the title testing">This is a paragraph.</p>
Attribute की value हमेंशा के लिए double और single-quoted में लिखना अच्छी habits होती है| तो हमेंशा Attribute value को double और single-quoted में लिखना अच्छा होता है|
Attribute की value single-quoted के साथ
<p title='for the title testing'>This is a paragraph.</p>
Attribute की value double-quoted के साथ
<p title="for the title testing">This is a paragraph.</p>