Name
<area> — NN: 2, 3, 4 • MSIE: 2, 3, 4, 5 • HTML 4 • WebTV • Opera3
Synopsis
<area>
The area tag is used within the <map>
tag of
a client-side imagemap to define a specific “hot”
(clickable) area.
Attributes
coords=
values
Specifies a list of comma-separated pixel coordinates that define a “hot” area of an imagemap. The specific syntax for the coordinates varies by shape as follows:
- Rectangles
If
shape=rect
orrectangle
, use the coordinatesx1,y1,x2,y2,
wherex1,y1
are the coordinates for the point at the top, left corner andx2,y2
are the coordinates for the bottom, right corner.- Circles
If
shape=circ
orcircle
, use the coordinatesx,y,r
, wherex
andy
are the coordinates of the centerpoint, andr
is the length of the radius.- Polygons
If
shape
=poly
, use the coordinatesx1,y1,x2,y2, x3,y3,
...,
where the values are sets ofx,y
coordinates for points around the path that surrounds the area.
href=
url
Specifies the URL for a specific area.
nohref
Defines a “mouse-sensitive” area in an imagemap for which there is no action when the user clicks in the area.
shape=rect|rectangle|circ|circle|poly|polygon
Defines the shape of the clickable area. The shape name must be accompanied by the appropriate set of coordinates (see syntax under
coords
attribute above).
Get HTML Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.