Easy Tutorial
❮ Tag Meter Att Global Dir ❯

HTML <area> alt Attribute

HTML <area> Tag

Example

An image map with clickable areas:


Browser Support

All major browsers support the alt attribute.


Definition and Usage

The alt attribute is a required attribute that specifies alternative text to be displayed when the image cannot be displayed.

Assuming that the user cannot view the image due to the following reasons, the alt attribute provides alternative information for the image:

The alt attribute is required if the href attribute is used.


Differences Between HTML 4.01 and HTML5

In HTML 4.01, the alt attribute is mandatory.

In HTML5, the alt attribute is only required if the href attribute is used. If the href attribute is not used, the alt attribute is not needed.


Syntax

Attribute Values

Value Description
text Specifies the alternative text for the area, in case the image cannot be displayed.

HTML <area> Tag

❮ Tag Meter Att Global Dir ❯