+ 2
What is "alt =" used inside img tag?
3 odpowiedzi
+ 1
Incase if the image does not load, the text in alt= is displayed
e.g alt="pic of a dog".
"Pic of a dog" (consider that image did not load)
+ 2
Stands for alternative, if the browser cannot display the image it shows text instead.
All your imgs should have alt attributes, in case the image doesn't load, end user will still know what's missing.
<img src="cat.jpg" alt="Cat's face">
+ 1
When the correct image written in image tag does not displayed on screen then alt= is diaplayed. in other words alt= is used for displaying error messages.