HTML and CSS Reference
In-Depth Information
Figure 5-9. Internet Explorer displays alt text in a
temporary pop-up window
The value for the alt attribute is a text string of up to 1,024 characters,
including spaces and punctuation. The string must be enclosed in quota-
tion marks. The alt text may contain entity references to special char-
acters, but it may not contain any other sort of markup; in particular,
style tags aren't allowed.
Graphical browsers don't normally display the alt attribute if the image
is available and the user has enabled picture downloading. Otherwise,
they insert the alt attribute's text as a label next to an image-placehold-
er icon. Well-chosen alt labels thereby additionally support those users
with graphical browsers who have disabled automatic image download
because of a slow connection to the Web.
Nongraphical, text-only browsers such as the ancient Lynx put the alt
text directly into the content flow, just like any other text element. So,
when used effectively, the alt tag sometimes can transparently substi-
tute for missing images. (Your text-only browser users will appreciate
not being constantly reminded of their second-class web citizenship.)
For example, consider using an asterisk as the alt attribute alternative
to a special bullet icon:
Search WWH ::




Custom Search