<area>

Creates a clickable zone in an interactive image using HTML.
2 min read
Believemy logo

The <area> tag is used in combination with the <map> tag to define clickable areas within an interactive image, often called an "image map".

Each <area> tag corresponds to a specific region of the image, allowing these areas to become clickable links to URLs or specific actions.

Good to know

It is particularly useful for creating interactive visual interfaces, such as maps, diagrams, or images with multiple points of interest.

Remember LeBonCoin's map? It was a clickable area that used the <area> tags!

Old homepage of LeBonCoin, a French classified ads website.
Old homepage of LeBonCoin, a French website like craiglist.

 

Structure and Syntax of the <area> Tag

Syntax

The <area> tag is used, as mentioned earlier, in conjunction with a <map> tag.

It is always structured as follows:

HTML
<area shape="[SHAPE]" coords="[COORDINATES]" href="[URL]" alt="[DESCRIPTION]" />

 

Usage Example

Here’s a "simple 🙄" example with a rectangle, a circle, and a polygon.

HTML
<img src="image-map.jpg" usemap="#example-map" alt="Image map example" />
<map name="example-map">
  <area shape="rect" coords="34,44,270,350" href="https://example.com/section1" alt="Section 1" />
  <area shape="circle" coords="450,150,75" href="https://example.com/section2" alt="Section 2" />
  <area shape="poly" coords="200,10,250,190,160,210" href="https://example.com/section3" alt="Section 3" />
</map>

And here’s a more engaging demonstration:

Good to know

Manually creating these "areas" can be tricky; they are often generated using specialized software such as Fla-shop.

 

Attributes

AttributeDescriptionPossible Values
shapeSpecifies the shape of the clickable area.rect, circle, poly, or default.
coordsDefines the coordinates of the area based on the specified shape.A list of numeric values separated by commas.
hrefHyperlink to redirect to when the area is clicked.A valid URL.
altProvides a textual description of the area for accessibility.Descriptive text.
targetSpecifies where to open the link (_self, _blank, _parent, or _top)._self (default), _blank, _parent, or _top.
downloadAllows downloading the linked file instead of redirecting to the URL.Optional value: filename.

 

Browser Compatibility

The <area> tag is widely supported by all modern and older browsers. However:

  • Remember to use it with the <map> tag to ensure functionality;
  • Include an alt attribute for better accessibility, as these areas are not always visible to users or screen readers. 😉

Related terms

Discover our hTML and CSS glossary

Browse the terms and definitions most commonly used in HTML and CSS development.

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.