Name
ALT — NN all IE all HTML all
Synopsis
ALT=”textMessage"Required
In a world littered with graphical browsers, it is often hard to
remember that not everyone can, or chooses to, download images. Aside
from those using VT100 terminals with browsers such as Lynx, pocket
computers often offer better performance when images don’t have
to be downloaded and rendered. To replace the image in such a
browser, the text assigned to the ALT attribute is
displayed where the IMG element appears on the
page. The ALT attribute should contain a brief
description of what the image is. The HTML recommendation calls the
ALT attribute a requirement for the
IMG element, but in practice, graphical browsers
can get by without it. Still, some browsers display the
ALT text initially as the image downloads from the
server, providing a temporary alternate display. Be aware that the
size of the image area on the page may limit the amount of text you
can use for ALT. Make sure the description is
readable.
Example
<IMG SRC="navbar.gif" USEMAP="#nav" ALT="Navigation Bar" WIDTH=400 HEIGHT=50>
Value
Any quoted string of characters.
Default
None.
Object Model Reference
- IE
[window.]document.imageName.alt
[window.]document.images[i].alt
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access