What is use of alt-""/ attribute | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is use of alt-""/ attribute

28th Nov 2016, 12:46 PM
Omkar Dolase
Omkar Dolase - avatar
3 Answers
+ 4
Its the alternative text just incase the image doesnt show up on some browsers. You put the text inside the quotes. Also make sure its alt=" " because a dash wont work. hope i was helpful to you :)
28th Nov 2016, 12:49 PM
Aquarius
Aquarius - avatar
+ 3
as aquarius told but i'll add that it help in SEO too.
28th Nov 2016, 10:14 PM
AVATAR
AVATAR - avatar
+ 2
Aquarius told correctly alt attribute is an alternative text for a image in case image is not available the /, dash is <IMG...../> is not with alt it is because it has no closing tag but some browser search it so / closes tag.
28th Nov 2016, 7:34 PM
Sandeep Chatterjee