English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Online Tools

Reference Manual

: <progress> tag

HTML <a> tag

HTML: <a> coords attribute

Online Example

Example
<!doctype html>
<html>
<head> - <title>html: <a> coords attribute usage3codebox.com)</title>
</head>
<body>
<p>Click on the sun or nearby planets in the image:/p>
<object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1">
 <map name="Map1">
   <a href="sun.html" shape="rect" coords="0,0,"82,126">Sun</a>
   <a href="mercur.html" shape="circle" coords="90,58,3">Mercury</a>
   <a href="venus.html" shape="circle" coords="124,58,8">Venus</a>
 </map>
</object>
<p><b>Attention:</b> Currently only Firefox and Opera browsers support the coords attribute.</p>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Currently, only Firefox and Opera browsers support the coords attribute.

Definition and Usage

HTML5The <a> coords attribute is not supported.

The coords attribute is usually used with shape These attributes can be used together to specify the size, shape, and position of the linked dimensions in the <object> or <img> elements.

The coordinates of the top left corner are 0,0.

Tip:To create an image map that is usable in all browsers, please use <area>  Element.

Syntax

<a coords="value">

Attribute Value

ValueDescription
x1,y1,x2,y2If the shape attribute is set to "rect", this value specifies the coordinates of the top left corner and the bottom right corner of the rectangle.
x,y,radiusIf the shape attribute is set to "circ", this value specifies the coordinates of the center and the radius of the circle.
x1,y1,x2,y2,..,xn,ynIf the shape attribute is set to "poly", this value specifies the coordinates of each side of the polygon. If the first coordinate and the last coordinate are not the same, then to close the polygon, the browser must add the last pair of coordinates.

HTML <a> tag