ALT Attribute | alt Property

MS Office DHTML, HTML & CSS

ALT Attribute | alt Property


Sets or retrieves a text alternative to the graphic.

Syntax

HTML<ELEMENT ALT = sTxt ... >
Scriptingobject.alt [ = sTxt ]

Possible Values

sTxtString that specifies the text to display as an alternative to the graphic.

The property is read/write with no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

The text is used to replace the graphic for text-only browsers, to display in the window before the graphic has loaded, and to act as a ToolTip when the user hovers the mouse over the graphic.

Example

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

Sample Code

<IMG SRC="http://example.microsoft.com/rw.gif" ALT="Read/Write Property">

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

AREA, IMG


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.