Questions tagged [alt]

'alt' (alternative text) is an HTML attribute for the 'img' element

alt is an HTML attribute used to give a text alternative for a picture (img element). It is an optional parameter for the img element.

Useful for visually impaired people, search engines, people that use text browser, in the cases that images can't be loaded, people with low bandwidth the text value within the alt tag is shown rather than the file itself.

For questions regarding the Flux library, see .

446 questions
159
votes
7 answers

Is it correct to use alt tag for an anchor link?

Is it correct to use alt tag for an anchor link, something like
user2067736
  • 1,615
  • 2
  • 13
  • 11
127
votes
12 answers

HTML img tag: title attribute vs. alt attribute?

I was browsing Amazon and I noticed that when searching "1TB" if you hover the mouse cursor over the stars rating image, you only see the score if using IE. If you are using another browser then the score won't show. A rating of 3.8 and a rating…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
34
votes
6 answers

SEO title vs alt vs text

Does the title attribute in a link do the job of the real text in the link for SEO? i.e Web Design is it the same as: click here when trying to get a good page rank for…
medk
  • 9,233
  • 18
  • 57
  • 79
33
votes
1 answer

When is it acceptable to leave the alt text empty on an HTML image (if ever)?

It has been my understanding up to this point that the alt attribute is required, and should not be left blank. This seems to be confirmed in existing questions, such as this one. However, in reading the HTML spec today, I noticed the following: A…
randak
  • 1,941
  • 1
  • 12
  • 22
22
votes
2 answers

Alt tag possible for inline SVG?

Is there a way to give an inline SVG an alt tag? Here is the code that I have for my inline SVG, but the alt tag is not showing (and I'm not even sure the way that I coded the alt tag is valid, after searching online for clarification):
Berklie
  • 490
  • 4
  • 9
  • 21
13
votes
3 answers

How can I display an image if browser does not support HTML5's

Does anyone know how can I display an image for the browsers which don't support the tag ? Displaying a text such as in:
mpaf
  • 6,597
  • 6
  • 38
  • 42
13
votes
5 answers

Alternate text for iframes

We have alternate text, alt attribute, for an img tag in HTML, which will show up when the image doesn't come up. I tried using the tag with iframe too.