Name

ALT — NN n/a IE 4 HTML 4

Synopsis

ALT=”textMessage"

Optional

If a browser is not capable of displaying graphical images (or has the feature turned off), the text assigned to the ALT attribute is supposed to display in the document where the image INPUT element’s tag appears. Typically, this text provides advice on what the page visitor is missing by not being able to view the image.

Input Types

image

Example

<INPUT TYPE="image" NAME="icon" SRC="sndIcon.gif" ALT="Sound Icon">

Value

Any quoted string of characters.

Default

None.

Object Model Reference

IE

[window.]document.formName.inputName.alt

[window.]document.forms[i].elements[i].alt

[window.]document.all.elementID.alt

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.