HTML | <img> alt Attribute
The <img> alt attribute is used to specify the alternate text for an image. It is useful when the image not displayed. It is used to give alternative information for an image.
Syntax:
<img alt="text">
Attribute Values: It contains single value text which specifies the alternative text for an image.
Example:
<!DOCTYPE html> <html> <head> <title> HTML img alt Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML img alt Attribute</h2> <img src= alt="GeeksforGeeks logo"> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by HTML <img> alt Attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



