Name

<area> — NN: 2, 3, 4 &bull; MSIE: 2, 3, 4, 5 &bull; HTML 4 &bull; WebTV &bull; 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 or rectangle, use the coordinates x1,y1,x2,y2, where x1,y1 are the coordinates for the point at the top, left corner and x2,y2 are the coordinates for the bottom, right corner.

Circles

If shape=circ or circle, use the coordinates x,y,r, where x and y are the coordinates of the centerpoint, and r is the length of the radius.

Polygons

If shape=poly, use the coordinates x1,y1,x2,y2, x3,y3,..., where the values are sets of x,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.