Syntax Diagram for <map>
Syntax Diagram for <area>
A client-side image map, defined between <map> and
</map> tags and used with the ismap and
usemap options of the <img>
tag, allows a single graphic to hyperlink to multiple destinations, depending
on where in that graphic the user clicks. The potential destination is
noted in the status line when the mouse is over a hyperlinked area, allowing
you to see, before actually clicking, where you'd go if you clicked
there. This is a marked improvement over the old-style server-side image
maps, which not only required extra server activity and network traffic, but
you never knew where you were going until you got there.
- shape and coords
- Specifies the shape of the hotlinked area, and determines how the
coordinate list should be interpreted. The valid shapes and
coordinate-list interpretations are as follows:
- rect (default)
- Rectangle; requires four coordinates: xmin,
ymin, xmax, ymax
(or left, top, right, bottom).
- circ, circle
- Circle; requires three coordinates: xcenter,
- poly, polygon
- Polygon; requires 2n coordinates, where n is the number
of vertices of the polygon: x1,
y1, x2, y2,
x3, y3, . . .
- Specifies the destination document to which the user goes if he clicks
within this area.
- Specifies that no action is to be take if the user clicks in the
associated area. Technically, this is not needed, because any area not
covered by one of the <area> tags is automatically a no-op
(no action is taken).
- Exactly like that of the <img> tag,
the alt text is the text that will be displayed if the browser
cannot display the graphic itself.
- Specifies the manner in which the next document is to be loaded (Netscape
only). The possible values are:
- target=name causes the document to be loaded into the
frame whose name is name (this name was defined in a <frame> tag).
- target=_self causes the document to be loaded into the frame
in which the hyperlinked graphic that was activated resides. In other
words, the hyperlinked graphic causing the action will no longer be
visible after the action takes place, because the document containing
the hyperlinked graphic is replaced by the document that the
href referenced. This is the default.
- target=_parent causes the document to be displayed in the
parent frame of the frame containing the hyperlink that was
activated. If the frame has no parent frame, _parent does the
same thing as _self.
- target=_top cause all frames to be removed, and the
referenced document to be loaded into the main browser window.
- target=_blank causes the referenced document to be loaded into
a new, separate, unnamed browser window.
This map tag specifies a window (or frame) with a white background, black
text, blue unvisited links, magenta visited links, and red active links:
. . .causes the following results: