A Complete Guide to Web Design

(やまだぃちぅ) #1
Imagemaps 139

Creating Links

Imagemaps

Web Design in a Nutshell, eMatter Edition

have a prominent field for entering the default URL, but on others you may
need to look for it under a pull-down menu.


  1. Select the type of imagemap (client- or server-side) you want to create.

  2. Save or export the map information. Server-side imagemaps are saved in a
    map definition file (.map) that will reside on the server. Client-side
    imagemaps are embedded directly in the HTML file.


If you do not have an imagemap tool, it is possible to write out the map informa-
tion by hand following the examples in this chapter. Simply note the pixel
coordinates as indicated by your image editor and type them into the appropriate
place in the map file. For instance, Photoshop’s Info palette gives pixel coordi-
nates as you move the mouse around the image.


Client-Side Imagemaps


Client-side imagemaps have three components:



  • An ordinary graphic file (.gif,.jpeg, or.png)

  • A map delimited bytags containing the coordinate and URL informa-
    tion for each area

  • Theusemapattribute within the image tag () that indicates which map
    to reference


There are many advantages to using client-side imagemaps. They are self-
contained within the HTML document and do not rely on a server to function. This
means you can test the imagemap on your local machine or make working site
demos for distribution on disk. It also cuts down on the load on your server and
improves response times. In addition, they display complete URL information in


Figure 8-1: Creating map information (shown in MapMaker 1.1.2)

Free download pdf