Name
COORDS — NN all IE all HTML 3.2
Synopsis
COORDS=”coord1, ... coordN"Optional
Although the formal W3C definition for the COORDS
attribute of an AREA element states that the
attribute is optional, that doesn’t mean that you can omit this
attribute and expect an AREA to behave as it
should. The COORDS attribute lets you define the
outline of the area to be associated with a particular link or
scripted action. Some third-party authoring tools can assist in
determining the coordinate points for a hot area. You can also load
the image into a graphics program that displays the cursor position
in real time and then transfer those values to the
COORDS attribute values.
Coordinate values are entered as a comma-delimited list. If two areas overlap, the area that is defined earlier in the HTML code takes precedence.
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
Value
Each coordinate is a length value, but the number of coordinates and
their order depend on the shape specified by the
SHAPE attribute, which may optionally be
associated with the element. For SHAPE="rect",
there are four coordinates (left, top, right, bottom); for
SHAPE="circle", there are three coordinates
(center-x, center-y, radius); for SHAPE="poly",
there are two coordinate values for each point that defines the shape
of the polygon (x1, y1,
x2, y2, x3,
y3,...xN,
yN).
Default
None.
Object Model Reference
- IE
[window.]document.all.elementID.coords
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access