To help the user, a browser may display, in the status line, the contents of the ALT attribute as the mouse or other pointing device is moved over an area.
|RECT, CIRCLE, POLY
|shape of the area
|default is RECT
|string of a form which depends on SHAPE
|coordinates for the area
|obligatory except for defaulted SHAPE
|address of a document
|acts as a hypertext link
|means that this region has no action
|useful when you want to cut a hole in a hotzone region
|textual description of the area
The meanings of SHAPE and the syntax and semantics of COORDS for each shape is the following:
|form of area
|syntax of COORDS
|meaning of COORDS
|the x and y coordinates of the upper left and lower right corner
|the x and y coordinates of the center and length of the radius
|the x and y coordinates of the vertices
The x and y coordinate values are measured in pixels from the upper left corner of the associated image. This means that the y values increase downwards.
Examples of various shapes:
|a rectangle of 10 by 10 pixels in the top left corner of the image
|a circle with radius of 5 pixels and center at location (10,10)
|a polygon (in this case, a triangle) with edge locations (10,50), (15,20), and (20,50)
<AREA HREF="guide.html" ALT="Guide" COORDS="0,0,118,28">
If two or more regions overlap, the region defined first in the map definition takes precedence over subsequent regions. Thus, to make part of an area defined by an AREA element inactive, put an AREA element with the NOHREF attribute before it.
A draft version of
contained DEFAULT as a possible value of SHAPE,
used to specify what happens if the user selects a point which does not
belong to any area specified in other AREA elements.
This was removed. The same effect can be achieved by using
AREA SHAPE=RECT COORDS="0,0,width,height"
as the last
one within a MAP element.
(Here width and height are the dimensions of the
entire image in pixels.)
The HTML specifications allow percentage values
for coordinates too, so that e.g.
COORDS="0,0,100%,100%" could be used when
specifying a rectangle which covers the entire image.
However, many popular browsers incorrecly treat such values
as pixels, i.e. ignore the
Thus, don't use percentages. This isn't a serious
restriction, since you
(or the program you use)
need to work with pixel values anyway
when setting up a useful image map.
The ALT attribute is used to provide text labels which can be displayed in the status line as the mouse or other pointing device is moved over hotzones, or for constructing a textual menu for non-graphical browsers. Authors are strongly recommended to provide meaningful ALT attributes to support interoperability with speech-based or text-only user agents. But notice that the value must be just a string with no text markup.