what are attributes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what are attributes

3rd Jul 2016, 3:12 PM
Aakash Sharma
Aakash Sharma - avatar
4 Answers
+ 2
HTML consists of tags.. <p> <h1> <ul> etc.. Most tags can have attributes to control and modify them in order to produce the result that the user wants. Consider this example: <img src="flower.jpg"> 'img' is a tag and 'src' is it's attribute to provide a source, an actual image to show on the page. You can add another attribute to <img>, 'alt' to provide alternative text in case the image doesn't load: <img src="flower.jpg" alt="A flower">
4th Jul 2016, 4:38 AM
ZinC
ZinC - avatar
+ 1
An HTML attribute is a modifier of an HTML element type.
7th Jul 2016, 12:02 PM
aduseihans
0
They are like mods for html elements.
4th Jul 2016, 10:30 AM
Qaz Wsx
Qaz Wsx - avatar
0
home pr 1st page ko dhyan se learn kr samjh me aa jayega.
5th Jul 2016, 5:33 AM
Upendra Shekhawat
Upendra Shekhawat - avatar