<coords>
The <coords>
element specifies the coordinates of a linkable
region in an <imagemap>
.
Usage information
The values for use in the <coords>
element
are defined by the HTML5 specification. The
unit used for coordinates is CSS pixels. The following table
provides a summary of the syntax, which depends on the shape of the
linkable region:
Shape | Syntax |
---|---|
circle | Three integers, separated by commas:
|
default | The default shape is the entire image. The
<coords> element should be
empty. |
poly | An even number of at least six integers, separated by commas:
|
rect | Four integers, separated by commas:
|
Specialization hierarchy
The <coords>
element is specialized from
<ph>
. It is defined in the utilities-domain module.
Content model
(Text |
<data>
|
<sort-as>
|
<foreign>
|
<keyword>
|
<term>
|
<text>
)*
Attributes
The following attributes
are available on this element: universal
attributes and @keyref
.
For this element, the
@translate
attribute has a default
value of no.
The following attributes are available on this element: universal attributes and the attributes defined below.
@keyref
- Specifies a key name that acts as a redirectable reference based on a key definition within a map. See The keyref attribute for information on using this attribute.
@translate
- For this element, the
@translate
attribute has a default value of no.
Example
This section is non-normative.
The following code sample shows how the
<coords>
element specifies the coordinates
of a polygonal region in an image map:
<area>
<shape>poly</shape>
<coords>119, 4, 90, 7, 87, 20, 53, 36, 45, 51, 7, 188, 12, 467,
223, 464, 240, 315, 223, 254, 210, 168, 193, 146, 173, 121, 167,
87, 169, 70, 181, 57, 189, 35, 164, 24, 140, 4
</coords>
<xref format="html" scope="external"
href="https://en.wikipedia.org/wiki/Frans_Banninck_Cocq">
Willem van Ruytenburch</xref>
</area>