HTML input alt Attribute
HTML <input> tag
Definition and Usage
The alt attribute specify a short description of the image when using input
type="image"
The alt attribute should be a short description of the image
This attribute is used when the user for some reason cannot see the image.
This could be because of a slow connection, an error in the image URL, or the
user could be using a text-only or non-visual browsers.
This attribute is only used if the type attribute of the input element is set
to "image".
Syntax
Syntax Example
<input alt="W3Schools button" />
|
Attribute Values
Value |
Description |
text |
A short description of the image. Note:
Even though this attribute is not specified as required, it should
always be used when the input type is "image". Not using the alt attribute will cause problems for
text-only browsers or non-visual browsers. |
Browser Support

The attribute is supported in all major browsers.
Example
<form action="">
<input type="image" src="input_image.gif" alt="W3Schools button" />
</form>
|
Try-It-Yourself Demos
input alt
attribute example
How use the alt attribute with the input type="image".
HTML <input> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|