[IMAGE] IU SLIS logo

Demo page logo

Image Mapping


Image maps are dynamic or active images embedded in html documents. By clicking on different regions of an image map the user links to different documents or URLs. Image maps can be great space savers, allowing designers to place several links into a small area. They are an alternative to text-based navigation elements.

An imagemap allows you to define specific regions of an image that you have created or scanned and uploaded to your www directory. These sections or hot spots are defined by the web page designer using standard HTML markup tags. This markup may be either in a separate file or in the same web page as the image.

You can construct image maps in one of two ways. One way is called theclient-side image map. Client-side maps depend upon the browser to read the map coordinates that define the hot spots and call up the appropriate document.

The second way, called the server-side image map, sends the chosen coordinates defining the boundaries of the hot spots to a script located on the server which then returns the document to the user.

Client-side image maps can be read by most of the popular browsers including Netscape Navigator 2.x (and higher), Microsoft's Internet Explorer and AOL's browser. However, they cannot be read by screen reader software or text-based browsers, so it is still important to provide alternative methods of access to your links.


Working with Client-side Image Maps

The basic idea of an image map is that you carve up the image into separate regions or hot spots, each of which you associate with a URL.

This image is a client-side image map. Every region in the image has been defined and associated with a specific URL. Counting the white space, the image has been divided into three distinct regions, a rectangle, a circle, and a polygon and a region made up of "what's left" (the white space). There are URLs that are associated with each region leading to four different documents.

If you click on any of the three elements, you will be sent to a different document. If you click anywhere in the white space, you will be sent to a default document.

On this page, you'll see the actual markup for this map, called IUimage.gif. This link opens a new browser window, so you should close it when you are ready to return here.

On this page, it is embedded at the bottom of the page markup. The individual lines of HTML code that make up this image map are described below.

IU Icon ImageMap - Client-Side

Client-side image maps consist of three elements:

Creating a client-side image map

There are five steps involved in creating a client side image map

1: Create the image file

2: Define the hot spots in the image file

3: Create the map file

4: Place the image map into the html document

So, when the image mapis created, where does it go in the document? And where does the map file go?

5: Click away!

Now that wasn't so bad, was it? Oh...one more thing.

Once you master image maps a whole new world of web page design is open to you. You don't have to link to static pages, you can click on an image and send a query to a database, launch a java applet, or a start a QuickTime movie. See, I told you it was easy.

Here's another example of a client-side image map that you can use.


Workingwith Server-side Image Maps

The second type of image map is called server-side because much of the action that takes place when you click on a hot spot takes place on the server. This type of image map is the older and more common. The process of accepting the map coordinates and sending the user to the right page based upon where they clicked takes place on the server not in the user's web browser.

It is a little more difficult to set up because it will involve you getting permission from the person maintaining the web server since resources on the server are required to make the image map work.

You have to use special programs that support this type of image map that are installed on the server in the cgi-bin directory.

IU Icons ImageMap - Server-Side

Server-side image maps have four elements:

There are three steps involved in creating a server-side image map.

1: Create the image file

2: Place the image map in the html Document

3: Create the map file and place in directory

4: Start clicking!

Not too shabby. Now let's try tables!


Demo Page
Navigation:
DemoPage contents About HTML UNIX help HTML tags Lists Links Images
Imagemapping Tables Forms Frames Javascript CSS (style sheets) XML


Page by Howard Rosenbaum
Find me at hrosenba@indiana.edu http://www.slis.indiana.edu/hrosenba/www/Demo/Demo12.html

Rectangle Polygon Circle Default area