As an example, this procedure will show how a simple navigation bar (image.gif) can be used as a client-side image map. Each button will be mapped to a different document.
To create a client-side image map:
<IMG SRC="image.gif">
The USEMAP parameter specifies the name of the map definition associated
with the image. For this example, the map definition is named demobar.
Since the map definition is in the same file, a filename is not required.
<IMG SRC="image.gif" USEMAP="img_maps.html#demobar">
Pixel coordinates begin at 0,0 in the upper-left corner of the image. Most graphic editors can be used to display pixel coordinates.
<MAP NAME="demobar"> <AREA SHAPE="RECT" COORDS= "24,18,143,41" HREF="previous.html"> <AREA SHAPE="RECT" COORDS= "168,18,287,41" HREF="next.html"> </MAP>This map definition maps the Previous button to a document named previous.html. The Next button is mapped to a document named next.html.
As you move the pointer over a mapped region, the URL of the document associated with the region is displayed in the status message area. This visual feedback allows users to know what regions are mapped as well as the document that will be loaded.
Server-side image maps cannot display this information because the URL
information is located on the server and is not available until after
the image has been clicked.
There are a few software programs out there that will create the Image-map HTML code for you. Check out our tools section for links to them.