Are there any common problems why alt attributes on images wont work.
Tested for IE8 Standards mode.
Thanks in adv.
Are there any common problems why alt attributes on images wont work.
Tested for IE8 Standards mode.
Thanks in adv.
if you want to show text from alt attrib, use title=''
attrib.
The difference:
alt
means just that, an alternative for when the image isn't displayed. If you want a tooltip, use title
or longdesc
. Historically alt
has been abused to mean this, but IE8 has finally fixed this.
By "not work" I'm assuming you mean that the alt text doesn't appear when you hover over the image. You'll need to use the title attribute if you always want the text to appear in all browsers:
<img src="foo.png" alt="bar" title="bar" />
Yes, you should always specify the alt
attribute for these reasons:
alt
will be shown insteadalt
tag is important in terms of Search Engine Optimization (SEO)