Name

alt — NN n/a IE 4 DOM 1

Synopsis

Read/Write

Text to be displayed where the IMG element appears on the page when a browser does not download graphics (or is waiting for the image to download). The text is usually a brief description of what the image is. Be aware that the size of the image area on the page may limit the amount of text you can assign to the alt property. Make sure the description is readable.

Example

document.corpLogo.alt = "MegaCorp Logo"

Value

Any quoted string of characters.

Default

None.

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.