alt Attribute


 

Where to use the alt Attribute


Description

The alt attribute is used to specify alternative text which will be used in place of a particular image if images are not supported or not enabled within a user agent. Obviously, alt text should be written such that the page makes sense after the replacement has taken place.

An empty string should be used for the alt text of any image which is used purely for aesthetic purposes since there is no need for someone not loading images to know it is there (although such images might be better included in a page using CSS).

See also the longdesc attribute (for img elements).


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > alt Attribute (XHTML 1.1)