alt attribute
From Wikipedia, the free encyclopedia
For the use of alt attributes in Wikipedia, see Wikipedia:Alternative text for images.
The alt attribute is used in HTML and XHTML documents to specify text that is to be rendered when the element to which it is applied cannot be rendered. In HTML 4.01, the attribute is required for the img and area element types. It is optional for the input element type and the deprecated applet element type.
Contents |
[edit] Common misconceptions
Internet Explorer incorrectly renders text in alt attributes as tooltip text.[1][2] This behavior led many programmers to use alt to display tooltips on webpages,[3] instead of using the title attribute that was intended for that use.[4] In Internet Explorer 8 the bug was fixed, and alt attributes no longer render as tooltips.[5]
The alt attribute is commonly, but incorrectly, referred to as the "alt tag".[6][7]
[edit] See also
[edit] References
- ^ Why doesn’t Mozilla display my alt tooltips?
- ^ http://annevankesteren.nl/2004/12/alt-attribute
- ^ Bug 25537 - Alt text is not displayed as a tooltip over <img>, Mozilla bugzilla
- ^ The global structure of an HTML document - 7.4.3 The title attribute
- ^ What's New in Internet Explorer 8 - Accessibility and ARIA
- ^ 456 Berea Street: Articles and news on web standards, accessibility, and usability. Archived by WayBack Machine
- ^ http://www.autisticcuckoo.net/archive.php?id=2004/07/20/tags-elements-attributes
[edit] External links
- W3C spec section on 'How to specify alternate text'
- Dive in to accessibility page on alt text
- Content Accessibility Tutorial
- Guidelines on alt texts in img elements by Jukka Korpela
- Easy tutorial on writing alt attributes by Estelle Weyl
- Mini-FAQ about the alternate text of images by Ian Hickson
- Optimising Alt Attributes Guidelines from EggRage

