Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <area> alt Attribute

The alt attribute on an <area> tag defines alternative text.

This text is used by screenreaders, search engines, JavaScript solutions, etc.

Alternative text on the area is not visible to the users.

Example

#

An alt attribute on 3 <area> tags.

Computer Monitor Keyboard Mouse
<img src="/img/html/computer-map.png" alt="Computer" usemap="#computermap">

<map name="computermap">
  <area alt="Monitor" shape="rect" coords="253,142,16,2" 
        href="href="javascript:alert('Monitor was clicked')">
  <area alt="Keyboard" shape="rect" coords="262,218,0,156" 
        href="javascript:alert('Keyboard was clicked')">
  <area alt="Mouse" shape="circle" coords="267,234,22" 
        href="javascript:alert('Mouse was clicked')">
</map>

Using alt

The alternative text must properly describe the <area>.

This attribute is helpful for screenreaders, search engines, JavaScript solutions, etc.


Syntax

<area href="URL" alt="text" />

Values

#

Value Description
text Alternative text if the image fails to load.

Browser support

Here is when alt support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <area>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides