Ask Dave Taylor: Tech and Business

Saturday

Create Your Own Imagemaps!

I am trying to make a web page and am having trouble with the HTML. I want to make some links at different places on the picture on the front page. Could you help me with the code? Right now the whole picture is a link, but I would like to make the ENTER sign a link as well. If you could just point me in the right direction
it would help a lot.


What you're talking about is what we Web folk call an image map, and they've been around in the Web world for years, albeit never too fabulously labeled or explained. The trick is that you need to do a fair bit of HTML footwork to get them to actually work properly...

There are two parts to an image map (and in this explanation, I'm only going to talk about cilent-side image maps. Server side image maps are so crufty and old that I haven't seen them used on a site in years) the map itself, which identifies regions and assigns a target URL to each, and the additional attribute on the img tag that tells the Web browser that there's an associated map.

To show you how this works, let's pick a graphical element that you might use on your own page. For fun, I'll pick the following image from the White House Web site...