Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML coords property

HTML coords property

HTML a Tag Reference HTML tag

Example

The following example uses the shape and coords properties in an element to create an image map:

Sun

Mercury

Venus

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently only Firefox and Opera browsers support the coords property.


Definition and Usage

HTML5 no longer supports the The tag's coords property.

The coords property is usually used together with the shape property; together, the two properties can specify the or size, shape, and position of the link in the element.

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

**Tip:** To create an image map that works in all browsers, use the .


Syntax

Attribute values

Value Description
x1,y1,x2,y2 If the shape property is set to "rect", this value specifies the coordinates of the top-left and bottom-right corners of the rectangle.
x,y,radius If the shape property is set to "circ", this value specifies the coordinates of the center and the radius of the circle.
x1,y1,x2,y2,..,xn,yn If the shape property is set to "poly", this value specifies the coordinates of each edge of the polygon. If the first and last coordinates do not match, the browser must add the last pair of coordinates to close the polygon.

HTML a Tag Reference HTML tag