alt attribute | alt property (Internet Explorer)

Switch View :
ScriptFree
alt attribute | alt property

[This documentation is preliminary and is subject to change.]

Sets or retrieves a text alternative to the graphic.

HTML 4.01 Specification, Section 13.8

Syntax

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

p = 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">

 

 

Build date: 3/8/2012

Community Content

yecril
object/@alt is not shown as a tooltip

Internet Explorer does not show a tooltip for an OBJECT without the TITLE attribute.