user3546093
user3546093

Reputation:

What does the alt attribute exactly make?

What does the alt attribute exactly make in a img? I know that I can google it, but every tutorial which I find says that alt protides alternative text for images, that aren't loaded and when i try to do it, it doesn't show anything : http://jsfiddle.net/VGq5D/.

Upvotes: 1

Views: 83

Answers (5)

Arjun Kamlakar
Arjun Kamlakar

Reputation: 60

By using alt we can see the alternate text and also it is used by the devices that will read for the blind people.
It is very impotent to use meaningful text in the alt attribute of any HTML tags/Controls
which is one of the w3 standards.

Upvotes: -1

Radek
Radek

Reputation: 329

If you change link in youre code for <img src="C:/wrongPath" alt="I can't see it it Results">' You should see alternative text. The reason way u can not see text now is because u have to put link to image on server not to website.

Upvotes: -1

gbellmann
gbellmann

Reputation: 1951

The alt attribute holds a text that will be shown whenever the image fails to load. That's what you read as "alternative text". Also, the software that blind people use uses that text.

Upvotes: 0

Pierre Granger
Pierre Granger

Reputation: 2012

It's most likely used for robots for indexation, they cannot "see" the image so you can telle them "this image represent this". It's also used for software for blind people, wich read the code and "speak" them so they can say : after this text was a picture of that.

Some common browser will show it, some others not but that's not really for usual visitors of your page, it's dedicated to robots/special softwares.

Upvotes: -1

Quentin
Quentin

Reputation: 943143

  • Most browsers will display it when the image does not load (your example works when I try it in Firefox)
  • Most browsers will display it when images are turned off
  • Text browsers (such as Links and Lynx) will display it
  • Screen readers will read it out
  • Search engines may pay attention to it

Screenshot of URL in question

Upvotes: 4

Related Questions