1. | In the (X)HTML document that contains the image, type <map.
|
2. | Type name="label" id="label">, where label is the name of the map.
|
3. | Type <area to define the first clickable area.
|
4. | Type alt="info", where info describes what will happen when the visitor clicks.
|
5. | Type shape="type", where type represents the area's shape. Use rect for a rectangle, circle for a circle, and poly for an irregular shape.
|
6. | For a rectangle, type coords="x1, y1, x2, y2", where x1, y1, x2, and y2 represent the upper-left and lower-right corners of the rectangle, as obtained on page 116, and shown in Figure 6.28.
For a circle, type coords="x, y, r" where x and y represent the center of the circle and r is the radius.
For a polygon, type coords="x1, y1, x2, y2" (and so on), giving the x and y coordinates of each point on the polygon.
|
| |
7. | Type href="url.html", where url.html is the address of the page that should appear when the user clicks in this area.
Or type nohref if a click in this area should have no result. For XHTML add ="nohref" immediately thereafter.
|
8. | If desired, type target="name", where name is the name of the window where the page should appear (see page 108).

|
9. | If desired, add a keyboard shortcut by typing accesskey="x" (see page 112).
|
10. | Type /> to complete the clickable area.
|
11. | Repeat steps 310 for each area.
|
12. | Type </map> to complete the map.
|
13. | Type <img src="image.gif", where image.gif is the name of the image to be used as an image map.

|
14. | Add image attributes, including alt.
|
15. | Type usemap="#label", where label is the map name defined in step 2.
|
16. | Type the final /> for the image.
|