+ 1
what is alt=""/>
<html> <head> <title>first page</title> </head> <body> <img src="http://www.sololearn.com/images/tree.jpg" alt="" /> </body> </html> yea its run but when i just remove alt=""> the image in unseen but why? so alt denotes something what is it
5 odpowiedzi
+ 4
"alt" attribute is a text value which will be displayed in case when image is not availabe in "src".
In your case maybe image is not available so it would be dispaying "".. once u remove alt then there is nothing to show.
+ 1
alt is an attribute of img tag that displays an alternative text when (for any reason) the image is not showing. Note: it is important to ALWAYS define an alternate text, this is mandatory for all img tags, and this is why when you remove the attribute the image is not show.
Always set an alternative text for images. In this example you could set: alt="tree" or any other descriptive words for your images.
+ 1
Alt is there so if the picture cannot be displayed on a site, the person on the site sees text that describes the image.
0
That's also for blind peoples to describe the website on their machine.
- 1
That's why you need to be specific about the alt because we need the internet to be a weird and often disturbing place for the blind as well