This describes what is commonly refered to as "client side imagemaps".
What is an IMAGEMAP?
An imagemap is what you would use to link multiple URLs to one image using different coordinates within the image.
First you would have an image. I'm going to go into PAINT and make a simple image. I'll make a square that is 200 wide and 200 tall.
I'm now going to divide the image into four quarters. As I draw the lines, I note the coordinates that the lines are being drawn at. Of course, I'm using a simple square divided right down the middle so it's easy to say I have a vertical line drawn at 100 and a horizontal line drawn at 100.
Let me color this a little and add some link names...
Now to display these images AND use them as an image map, you need to modify your IMG SRC tag a little...
<IMG SRC="imap.gif" USEMAP="#imagemap" BORDER=0>The USEMAP tag designates the location of the imagemap's coordinates and links. Sometimes it can be in a whole other HTML document (for example: USEMAP="imagemap.html#imap"), and I've found most tutorials show this method. I chose to put the imagemap coordinates in the same document as the rest of the HTML, with the MAP NAME of "imagemap", which brings me to the next step, creating a map definition. You would start with NAMING your image map. You can see in my IMG SRC tag that I already chose the name "imagemap" for myself. Define the shape (chosing from rect, circle or polygon) and the links you want particulair coordinates to take the user. Here's my map definition:
<MAP NAME="imagemap">This is the essential chunk of HTML that would be placed in the HTML document (or another document file dedicated to the imagemap).
This gives you the working example found here.
The coordinates are the most confusing part of image mapping. The set of four numbers in each COORDS break down like this:
E-Mail Jonny Webhead