0
What does alt attribute mean
alt
6 ответов
+ 2
the alt attribute contains text, wich will be displayed if the image could not be loaded.
+ 2
@Gianne: I tried it in a view browsers. If you write it like Sommath, you will get the alternative text e.g. in Opera. In Safari I don't get the alternativ text. Don't know what about Firefox or IE...
Long story short: the code is correct, but it depends on the browser you use.
I published a sample code, so you could test it if you want.
0
i tried putting an invalid img source. y did the alt attribute text value wasnt shown?
0
well it is an attribute inside img tag <img> its use is when your image couldn't load in a certain condition then the text inside <img src=pic.jpg alt="the image couldn't load"> output - the image couldn't load. will be displayed
0
Thank you @jmey ! :)
0
As jmey wrote but it also helps with SEO (search engine optimization)