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

NameTypeDescription
coordscomma-separated integersDefines 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>
HTML Reference