Using ImageMaps

Using ImageMaps


What an ImageMap does for your Web Page(s) is allow you to create a single large image and have sections of it link to other pages within your Web Site.

Here's how to set up the HTML page to run a client side map.

Create an image file using your graphics program, saving the file as either a GIF or a JPG image. We'll call ours filename.gif.

Next you want to setup your hot spots to click. The hot spots are calculated based on the upper left and lower right sets of coordinates, using the actual pixels as increments, for each "zone" on the image.

Now in your HTML define the map name and hotspots with a tag that will look something like this:

  • "shape" (usually 'rect' but can also be 'circle' or 'ploy')
  • "URL" (the link that should be made from that particular hot spot)
  • "coordinates" (the numerical coordinates of the upper left and lower right corners of the hot spot)

NOTE: the coordinates are in a comma-separated list with NO SPACES. The HREF is the URL or filename the hotspot defined by the 'coords' should link to.

In the HTML where you want the image to appear, include an IMG SRC tag like this:

Use your image file name instead of filename.gif. Assuming you've called your map (defined in the previous step) "map", you can leave the USEMAP tag as it appears. Save the HTML file and upload it to the server to test it.