0
what is the function of alt=""?
<img src="https://i.pinimg.com/originals/ca/a2/65/caa2654e79e2dc88c6a3c18e1a353452.jpg" height="30%" width="50%" border="1px"alt=""/>
5 Answers
+ 1
Yamo hi,
Also one important thing about alt is for blind people using text to speech or screen reader.
When it comes to the image the text inside the alt is read aloud for them even if the image is displayed.
https://abilitynet.org.uk/news-blogs/five-golden-rules-compliant-alt-text
https://accessibility.psu.edu/images/alttext/
And one other thing, I think it is useful for SEO, for referencing,when search engine collect and analyze datas within webpages.
https://moz.com/learn/seo/alt-text
+ 1
Thank you for the answer guys!
0
If image doesn't displays it shows some text that you put in alt
0
The required alt attribute specifies an alternate text for an image, if the image cannot be displayed.Â
Eg.
<img src="sun.png" alt="Sun" />
It's a optional attribute in image tag to know about image.
0
In case the image cannot be displayed, the alt attribute specifies an alternate text that describes the image in words.