HTML <input> alt Attribute

❮ HTML <input> tag


<input type="image" src="submit.jpg" alt="Submit" width="50" height="50">


alt attribute is used to display an alternative description of image buttons.

It valid for the image button only, the alt attribute provides alternative text for the image, displaying the value of the attribute if the image scr is missing or otherwise fails to load. See <input type="image">.

Standard Syntax

HTML: <input alt="text">
XHTML: <input alt="text" />

Browser Support


Attribute Values

Value Description
text Specifies an alternate text for the image type.
❮ HTML <input> tag