The HTML Attribute reference

"coords" - html Attribute

  • Specifies the position and shape on the screen. The number and order of values depends on The shape being defined.
  • For use with client-side image maps

Value(s): coordinates

Possible attribute, coords, values for this element:
Attribute value description
rect left-x, top-y, right-x, bottom-y.
circle center-x, center-y, radius. Note. When the radius value is a percentage value, user agents should calculate the final radius value based on the associated object's width and height. The radius should be the smaller value of the two.
poly x1, y1, x2, y2, ..., xN, yN. The first x and y coordinate pair and the last should be the same to close the polygon. When these coordinate values are not the same, user agents should infer an additional coordinate pair to close the polygon.

Attribute "coords" example:
    <object data="images/TheSun.png"
            title="The Sun image"  usemap="#sunmap">
      <map name="sunmap">
        <a  shape="circle" 
        onclick="alert('You clicked on the sun');">Sun</a>
    <br/>Remember: This will not work in Internet Explorer.
Used in the element(s):
Elements Description
a The A element denotes an anchor; a hypertext link or the destination of a link.
area This element defines a map region on a client-side image.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.