HTML Attributes
HTML coords attribute
Defines image-map hotspot coordinates according to shape: rectangle corners, circle center and radius, or polygon points. Coordinates are in CSS pixels relative to the image. Applicable elements include: <area>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.
Formal Syntax & Structure
html syntaxhtml
coords="0,0,80,80"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| coords | comma-separated integers | Defines image-map hotspot coordinates according to shape: rectangle corners, circle center and radius, or polygon points. Coordinates are in CSS pixels relative to the image. |
Working Example
Example Snippethtml
<img src="map.png" alt="Campus map" usemap="#campus"><map name="campus"> <area shape="rect" coords="0,0,80,80" href="/library" alt="Library"></map>