HTML alt property
Example
An HTML form with an image submit button:
Try it »
Browser support





All major browsers support the alt property.
Definition and Usage
The alt attribute provides alternative text for when the user cannot view the image for some reason (such as a slow connection, an error in the src attribute, images disabled in the browser, or the user using a screen reader).
**Note:** The alt attribute can only be used with the .
Differences between HTML 4.01 and HTML5
none.
Syntax
Attribute values
| Value | Description |
|---|---|
| text | Specifies alternative text for an image. |
HTML tag