+ 3
Do we have to write anything inside alt="_"
7 Answers
+ 5
You do not have to, but you should.
The alt attribute is for "alternative text". It can be displayed when the image cannot be found at the position specified in the src attribute, and it can be read aloud to blind people who browse the page.
EDIT
The alt attribute might also be used by search engines that crawl your website to understand better how to classify and rank your page. Although there has been some significant progress with automated image classification techniques based on machine learning (meaning that it is possible to "guess" automatically if an image represents a dog or a house, or a car, etc...) providing a short description is still the best option.
+ 4
alt is not compulsory the value we write within them is shown if the image failed to load then.
+ 1
not necessary but you should it helps browser to explain what content is about
+ 1
it's alternative text in case of image is not available.
0
not necessary
0
it needed because if it fails to load the image we have another option to reach image through alt
0
it is optional