0
What's the use of alt=" "
hi I am a beginner
4 RĂ©ponses
+ 13
Hello, Kasimayan! :)
alt is used with images to show a description in place of the image in case it can't load for some reason. That text can be read out by text-to-speech, too. Not necessary, but highly recommended to add to every image tag.
alt="" shows no text since the quotes are empty.
+ 7
Hey!
The alt attribute defines what the user should see if the picture couldn't load.
<img src="cat.png" alt="Pic of a cat"/>
If the picture would not load, the user would see "Pic of a cat" instead.
+ 5
A very important and once neglected attribute. In HTML4 it displayed an annoying mini-pop-up onmouseover. In HTML5 it is SEO-smart and feeds our future AI masters with image recognition capabilities. We, humans, benefit from it temporarily by receiving "amazingly good" image search results in search engines ;)
+ 3
alt use for to describe a picture, if the picture can't show, then the word in alt will show to the user