<area>

line.gif

Defines hotspots within a graphic.

Syntax

<area shape=value coords=position href=url nohref target=name>

Attributes

Attributes of the Area Tag
shape One of rect, circle, polygon or default. The default is rect.
coords A list of values defining the position of the shape (see below).
href The url of the document to be loaded upon activation.
nohref This attribute indicates that the specified area is not a hyperlink.
target A name that is associated (by the browser) with the target of the link.


Values for the Coord Attribute of the Area Tag
rect Four values, representing the coordinates of the lower left and upper right vertices of the rectangle.
circle Three values, representing the coordinates of the circle's center and the circle's radius (respectively).
polygon A sequence of coordinates defining the vertices of the polygon.

Notes

For the coords attribute, a pair of points is required for each rectangle. For example, a map with three coincident rectangles may be specified as follows.

<map name=mapname>
<area shape=rect coords="0, 0 19,60" href=panel_1.html>
<area shape=rect coords="20,0 39,60" href=panel_2.html>
<area shape=rect coords="40,0 59,60" href=panel_3.html>
</map>

Each circle requires three values for its specification; these are:

  1. the x-coordinate of the circle's center,
  2. the y-coordinate of the circle's center and
  3. the radius of the circle.

The format of a map specification defining two concetric circles is as follows.

<map name=circle>
<area shape=circle coords="100, 100, 50" href=panel_1.html>
<area shape=circle coords="100, 100, 100" href=panel_2.html>
</map>

In the case when areas overlap, the order of their specification within the map determines which link is used. That is, the closer to the top of the list, the higher the priority of the area. In the case above, the inner circle takes precedence over the outer (containing) circle because it comes first in the list.

If polygon is specified for the shape then a comma separated list of coordinates should be given; that is, the coordinates of each vertex in the polygon should be specified.