HTML <area> alt attribute
Definition and Usage
alt
attribute specifies the alternative text for the designated area if the image cannot be displayed.
If the user is unable to view the image for some reason (due to slow connection speed, incorrect src attribute, or the user is using a screen reader),alt
attribute provides alternative information for the image.
if it exists href attributemust be used alt
Attribute.
Tip:We strongly recommend that you use this attribute in each image of the document. This way, even if the image cannot be displayed, users can still see some information about what is missing. And for people with disabilities,alt
Attributes are usually the only way they understand the content of the image.
Example
Use the alt attribute to specify alternative text for each area in the image map:
<map name="planetmap"> <area shape="rect" coords="0,0,114,576" href="sun.html" alt="Sun"> <area shape="circle" coords="190,230,5" href="mercury.html" alt="Mercury"> <area shape="circle" coords="228,230,5" href="venus.html" alt="Venus"> </map>
Syntax
<area alt="text">
Attribute Value
Value | Description |
---|---|
text | Alternative text for the specified area, if the image cannot be displayed. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |