Alt tags not working

ooh

Free Member
Mar 3, 2010
140
32
Alt tags aren't supposed to work on hover (alt text is to provide replacement text for an image to be used by the browser in the event of the image not being displayable for whatever reason). I think Internet Explorer does use alt tags in that way which is actually incorrect. If you want text to come up on hover give the HTML element a title attribute, eg. :

<h1 title="pop up text here">Hover over me</h1>
 
Last edited:
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,659
8
15,359
Aldershot
www.aerin.co.uk
Alt attributes (not tags) aren't suppost to show when you hover. Alt is the abbreviation for 'alternate text' - what displays if the image isn't displaying. If you want the tooltip you need to use title:

http://www.w3.org/TR/html401/struct/links.html#h-12.1.3

Example:
<a href="some.gif" title="Image of xxx" alt="Image of xxx>Anchor text/image</a>
 
Last edited:
Upvote 0

Latest Articles

Join UK Business Forums for free business advice