HTML - HTML Element Attributes
Attributes ये Elements का एक structure होता है | Attributes के जरिये Elements पर कुछ information दी जाती है |
Opening Elements पर attributes को दिया जाता है |
HTML के कुछ elements पर सिर्फ attribute_name ही होता है, लेकिन ज्यादातर Elements पर attribute_name=value इस प्रकार की जोड़ीयों में attributes को दिया जाता है |
HTML के सभी Elements के लिए attribute होता है | एक Element पर एक या एक से ज्यादा attributes हो सकते है |
Attribute की value को single('') या double quotes("") के बीच में लिखा जाता है, लेकिन कुछ attributes को singl या double quotes की जरुरत नहीं होती है |
<ele_name attr_name1="value1", attr_name2="value2">content</ele_name>
Some Regular Attributes in HTML
src, width and height Attributes for 'img' element
<img src="hindilearn.png" width="170px" height="50px">

href Attribute for anchor element in HTML
<a href="http://www.hindilearn.in">Visit Hindilearn.in</a>
Use Attribute's Value Without single('')/double("") Quotes in HTML
कुछ attributes ऐसे होते है जिनकी values को single('') या double("") qoutes क जरुरत नहीं होती है |
<a href="http://www.hindilearn.in">Visit Hindilearn.in</a><br /> <img src="hindilearn.png" width="170px" height="50px">
Inline CSS Attribute
<img src="hindilearn.png" style="width:170px;height:50px;">

Attribute Without Value in HTML
कुछ attributes ऐसे होते है जिनकी values नहीं होती है |
<input type="text"><br /><br /> <input type="text" disabled> With 'Disabled' Attribute
With 'Disabled' Attribute