HTML coords Attribute

❮ HTML Attributes


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

<map name="image-map">
    <area target="_blank" alt="Computer" title="Computer" href="img/computer.png" coords="365,99,905,783" shape="rect">
    <area target="_blank" alt="Cup" title="Cup" href="img/cup.png" coords="1047,672,97" shape="circle">
    <area target="_blank" alt="Mobile" title="Mobile" href="img/mobile.png" coords="960,385,1040,541" shape="rect">
    <area target="_blank" alt="Book" title="Book" href="img/book.png" coords="175,426,96,527,20,664,232,755,298,628,364,505" shape="poly">


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


Standard Syntax

<element coords="value">

Browser Support


Applies to:

The coords attribute can be used on the following element:

Element Attribute
<area> coords

Attribute Values

Value Description
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 Attributes