HTML <area> coords Attribute

❮ HTML <area> tag

Example

<img src="desk.jpg" usemap="#image-map">

<map name="image-map">
  <area target="_blank" alt="Computer" title="Computer" href="computer.png" coords="112,31,285,246" shape="rect">
  <area target="_blank" alt="Cup" title="Cup" href="cup.png" coords="327,212,31" shape="circle">
  <area target="_blank" alt="Mobile" title="Mobile" href="mobile.png" coords="296,121,326,176" shape="rect">
  <area target="_blank" alt="Book" title="Book" href="book.png" coords="53,132,115,157,72,237,2,211" shape="poly">
</map>

Meaning

The coords attribute contains a set of values specifying the coordinates of the hotspot region.

Notes:


Standard Syntax

<area coords="value">



Browser Support




status







Attribute Values

Shape Value Description Example
default - The entire region. -
rect x1,y1,x2,y2 The coordinates of the top-left and bottom-right corner of the rectangle. <area shape="rect" coords="0,0,200,300" href="#" target="_blank" alt="txt">
circle x,y,radius The coordinates of the circle center and the radius. <area shape="circle" coords="1047,672,97" href="#" target="_blank" alt="txt">
poly x1,y1,x2,y2,..,xn,yn The coordinates of the edges of the polygon. <area shape="poly" coords="175,426,96,527,20,664,232" href="#" target="_blank" alt="txt">
❮ HTML <area> tag