alt attribute

From Wikipedia, the free encyclopedia

Jump to: navigation, search

The alt attribute is used in HTML and XHTML documents to specify text that is to be rendered when the element to which it is applied cannot be rendered. In HTML 4.01, the attribute is required for the img and area element types. It is optional for the input element type and the deprecated applet element type.

Contents

[edit] Common misconceptions

Internet Explorer incorrectly renders text in alt attributes as tooltip text.[1][2] This behavior led many programmers to use alt to display tooltips on webpages,[3] instead of using the title attribute that was intended for that use.[4] In Internet Explorer 8 the bug was fixed, and alt attributes no longer render as tooltips.[5]

The alt attribute is commonly, but incorrectly, referred to as the "alt tag".[6][7]

[edit] See also

[edit] References

[edit] External links

Personal tools