+ 1

img alternative text....

In case the image cannot be displayed, the alt attribute specifies an alternate text that describes the image in words .......can somebody plzz give me an example?

8th May 2017, 6:20 AM
Nianotino
Nianotino - avatar
3 odpowiedzi
+ 6
<img src='cat003.jpg' alt='white cat'/> Using alt is recommended as search engines (google, bing, etc.) use it to actually "know" what the image represents. When searched for a phrase and switching to "images" in the search engine, the search results are mostly (but not only) based on indexed alt attributes of img tags.
8th May 2017, 6:39 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
<< 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
8th May 2017, 12:16 PM
visph
visph - avatar
8th May 2017, 6:34 AM
Complex
Complex - avatar