alt attribute | alt property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
6 out of 7 rated this helpful - Rate this topic

Sets or retrieves a text alternative to the graphic.

HTML 4.01 Specification, Section 13.8

Syntax

HTML<element alt="altText" ... >
JavaScript

altText = object.alt

Property values

Type: String

the text to display as an alternative to the graphic.

Standards information

Remarks

The text is used to replace the graphic for text-only browsers and to display in the window before the graphic has loaded. The text also acts as a ToolTip if the title is not set when the user hovers the mouse over the graphic.

Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.

In Microsoft Internet Explorer 6, This property now applies to the object object.

Examples

This example uses the alt attribute to indicate that the icon displayed denotes a read/write property.


<img src="http://example.microsoft.com/rw.png" ALT="Read/Write Property">

See also

object
applet
area
input
input type=image
img

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.