Web Page CentralPoliciesHTMLFAQPublishingBookletToolsLinks

Home :: Learning HTML :: Image Maps

Search

[Help]
Match:

[Off Site Link]=Off Site Link[Help]

[Direct Link to File]=Link to File[Help]

Image Maps

Contents:

Creating Map Files

Image Maps are images which have "hot spots," or areas on which readers can click and be taken to another URL. In order for a page to have an image map, it needs

  1. a graphic to click on, and
  2. a MAP element in the HTML

The MAP element defines where the "hot spots" are and their corresponding URLs.

This kind of image map is called a Client Side Image Map. Some software refers to it as a CSIM map. Only the most ancient of browsers cannot handle CSIMs. But, this being the District we know and love, the most ancient browsers could well be in our audience. That's why redundant text links are highly recommended.

Here's an example Client Side Map:

<MAP NAME="sections">
<AREA SHAPE="RECT" HREF="advanc10.htm" COORDS="0,0,10,15" ALT="HTML Tables">
<AREA SHAPE="CIRCLE" HREF="advanc20.htm" COORDS="20,15,12,15" ALT="HTML Forms">
<AREA SHAPE="POLY" HREF="advanc30.htm" COORDS="30,0,30,25,40,25,45,15,50,0" ALT="Special Character Entities">
<AREA SHAPE="RECT" NOHREF COORDS="0,0,55,30" ALT="">
</MAP>

The MAP element needs the NAME attribute; you need to name your MAP so you can link to it from your image. The only element allowed in a MAP element is the AREA element. The AREA element, like an IMG element, is an empty element, so it has no closing tag (</AREA>) and requires alternate text. Here are some features of the AREA element:

Return to the Top


Using Map Files

You can easily make image maps using AOL Press 2.0 -- here's how. AOL Press will do all of the steps below for you. Otherwise, there are other programs that can make image maps listed on the Graphics Applications page in the Tools Section.

So, now you have an HTML document, a graphic, and a MAP element containing several AREA elements. Here's how you put them together.

First, you add your IMG element to the document:
<P><IMG SRC="whatever.gif" ALT="Advanced Sections" BORDER="0" USEMAP="#sections"></P>

Then, somewhere on your page, you copy-n-paste the MAP element into your document. I usually put it between the last </P> and the </BODY> tags, so it's out of the way.

And that's about it. Remember to add text links to your page, as well, for those with old, old browsers.

Programs to Make Image Map Files Automagically

Previous: Counters


Home:: Learning HTML :: Image Maps

Home | Policies | HTML | FAQ
Publishing | Booklet | Tools | Links

Last Update: 1999-06-01
This Page's Address: http://www.madison.k12.wi.us/webpub/advanc50.htm
District Home Page: http://www.madison.k12.wi.us
HTML Editor & Publisher: Chris Burch, cburch@madison.k12.wi.us
webmaster@madison.k12.wi.us