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 .

424 questions
135
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,375
  • 2
  • 10
  • 11
114
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
  • 130,775
  • 117
  • 415
  • 675
36
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
  • 8,175
  • 16
  • 48
  • 71
22
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,711
  • 10
  • 22
20
votes
5 answers

using alt in sequence diagrams for starUML

i am not able to discover how to use the alt/combined fragment correctly in starUML,as in there is no way that i am able to provide the condition after the alt fragment appears.can any1 just list down the procedure as to how to do it or a link to…
arinjita paul
  • 201
  • 1
  • 2
  • 4
14
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
  • 361
  • 3
  • 8
  • 19
12
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
  • 5,493
  • 4
  • 34
  • 38
12
votes
6 answers

Alt? Longdesc? Title? What goes where, especially for image-heavy sites?

So I've been trying to make my site as accessible as possible (for non-JavaScript users, web crawlers, screen readers, etc), and I hit a large snag. The site I'm developing is very image heavy. (I draw stupid stuff in my spare time and the site is a…
Orangestar
  • 167
  • 1
  • 7
10
votes
3 answers

Put title/alt attributes into CSS :after { content: image }?

I’ve got the following CSS to add a PDF icon to any link that links to a PDF: a.pdf-link:after { padding-left: 2px; content: url(../images/icon-pdf-link.gif);} Is it possible to put some title and alt attributes on this image? I would like it so…
SventoryMang
  • 9,656
  • 12
  • 66
  • 103
10
votes
2 answers

How do I add alternative text to an object?

If I had an object like this:

Karen
  • 1,041
  • 3
  • 16
  • 26
10
votes
4 answers

google-map tiles missing alt tag causing lower accessibility score

How can we add blank alt tags to the Google map tiles (generated by v3 api) so that they do not lower our accessibility score? http://berkeley.edu/map/googlemap/
user3124388
  • 101
  • 1
  • 4
9
votes
2 answers

About the Title/Alt attributes;

I hope I can post this. I understand the the purpose of the title and alt attributes, but I just do not understand the best use for them or if I can use the same title/alt more than once. For Example a website about dogs: From my understanding all…
Vex Silver
  • 127
  • 1
  • 1
  • 7
9
votes
3 answers

How can I set text to be copied to clipboard when image is copied?

I am building a web page and have run into something that would be nice to be able to do; set text to be copied to the clipboard when someone tries to copy an image, probably the same as the alt text. Is there any way with javascript/html that this…
user1559041
8
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.