0

What does 'alt' do in img tag?

31st Jul 2017, 3:36 PM
Tanushree B
Tanushree B - avatar
2 Answers
+ 13
In case the image cannot be displayed, the alt attribute specifies an alternate text that describes the image in words. It's somewhat mandatory.
31st Jul 2017, 3:37 PM
Dev
Dev - avatar
+ 6
It shows up instead of an image if something goes wrong or image loading is off. Also, gives a context to the image, so it is searchable (SEO-wise) and interpretable.
31st Jul 2017, 3:37 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar