IMG.alt (Property)

An alternative text used when the image is defined as an input item.


DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myIMG.alt

Objects can have an alternative text string associated with them. This is useful for browsers that cannot cope with the tag and hence may display the alternate text. If spoken styles are supported, the text may be read out to the user. Some browsers will also display the alt text as a tool-tip if the mouse pointer is positioned over the object and remains static for a few seconds.