Why we add alt="". In the end ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we add alt="". In the end ?

29th Mar 2020, 5:14 PM
Ayman Atigui
Ayman Atigui - avatar
3 Answers
+ 4
The alt="" is an attribute which specifies an alternate text for an image. If the image cannot be displayed, the alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, image is not in the specified location, user has blocked loading images etc.). Example: <img src="bike.png" alt="Bike Photo"> than, if the image couldn't be loaded due to reasons mentioned above, than the reader will know that the image was of Bike even without the image was loaded. That's it.
29th Mar 2020, 5:19 PM
Bibek Oli
Bibek Oli - avatar
0
Ayman Atigui It is not necessary to add at the end. You can add at the beginning also.
29th Mar 2020, 10:34 PM
A͢J
A͢J - avatar
0
Thanks you
30th Mar 2020, 1:30 PM
Ayman Atigui
Ayman Atigui - avatar