Jump to content

Alt Text: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Reisio (talk | contribs)
rm null text - purely decorative images should be included via CSS
Redirect to Alt attribute (a more specific destination) rather than to the more-general Attribute (computing).
 
(24 intermediate revisions by 14 users not shown)
Line 1: Line 1:
#REDIRECT [[Alt attribute]]
[[Image:BBC.svg|thumb|right|Depending on where it appears, the alt text of the [[BBC]]'s logo might be "Corporate logo of the British Broadcasting Corporation", "BBC" or a null value. In this case, it's the full text of this caption.]]
[[Image:alt text.png|frame|right|Screenshot of preceding images' alt text (note "enlarge" option) rendered instead of the images.]]

'''Alt''' (or "''alternate''"/ "''alternative''") '''text''' is text included inside an <code>alt</code> attribute in [[HTML]] (et al.) documents which is to be [[rendering (computer graphics)|rendered]] when the [[HTML element|element]] it is applied to cannot be.

It is intended to be presented when the image (or other object) to which it pertains is not available to the user, for instance in a text-only [[web browser|browser]] or a [[refreshable Braille display]]. It is also available for indexing by [[search engine]]s.

In HTML 4.01, the presence of the attribute is a requirement with <code>img</code> and <code>area</code> elements, for [[World Wide Web Consortium|HTML standard]] compliance. It is optional for the <code>input</code> element and the [[deprecation|deprecated]] <code>[[applet]]</code> element.

Alt text may be null (<code>alt=""</code>); however, the use of ''meaningful'' alt text is necessary to comply with [[WAI|accessibility standards]] and is good practice.

Alt text is commonly, but incorrectly, refered to as an image's "alt tag". It is not intended to provide "pop up" text or [[tooltip]]s when a user's [[mouse (computing)|mouse]] hovers over the image, though alt text has historically been presented in this way in some [[web browser]]s; HTML's <code>title</code> attribute is intended for that purpose.

==External links==
*[http://www.w3.org/TR/html401/struct/objects.html#adef-alt W3C spec section on 'How to specify alternate text']
*[http://ppewww.ph.gla.ac.uk/~flavell/alt/alt-text.html Alt text guidance from Alan Flavell] with section on humourous gaffes
*[http://diveintoaccessibility.org/day_23_providing_text_equivalents_for_images.html Dive in to accessibility page on alt text]
*[http://www.yourhtmlsource.com/accessibility/contentaccessibility.html Content Accessibility Tutorial]
*[http://www.cs.tut.fi/~jkorpela/html/alt.html Alt text guidelines from Jukka "Yucca" Korpela]

{{Web-stub}}

Latest revision as of 18:21, 18 June 2009

Redirect to: