Advertisement
Home Open Editor ❯

HTML <input> alt Attribute

Example

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

Try this code ❯

Meaning

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" />


Advertisement

Attribute Values

Value Description
text Specifies an alternate text for the image type.
Home Open Editor ❯
Advertisement