+ 1

What the use of alt when adding an image ?

when we add an image we use <img="exemple. jpg" alt="" /> . I don't understand the use of alt.

6th Mar 2017, 7:45 PM
Hashim
Hashim - avatar
4 ответов
+ 17
Alternative text shown if image not loaded properly...
6th Mar 2017, 7:50 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 11
Pleaaaase: search for already asked/answered question before posting a new one ^^ This one was in the top posted question :P << alt This attribute defines the alternative text describing the image. Users will see this text displayed if the image URL is wrong, the image is not in one of the supported formats, or if the image is not yet downloaded. Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with vision impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an unsupported type. In these cases, the browser may replace the image with the text defined in this element's alt attribute. You should, for these reasons and others, provide a useful value for altwhenever possible. Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (alt="") indicates that this image is not a key part of the content, and that non-visual browsers may omit it from rendering. >> source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
7th Mar 2017, 4:12 AM
visph
visph - avatar
0
alt is for alternative text, for example the link of your image is dead, the text will replace the image to explain what was the image. the other function is to describe the website for blind peoples... Google like it :) internet must be accessed by everyone
6th Mar 2017, 7:50 PM
Geoffrey L
Geoffrey L - avatar
0
thanks alot :)
6th Mar 2017, 7:52 PM
Hashim
Hashim - avatar