The ISMAP and USEMAP Attribute

BLHteacher | Resources | Project


One way to enable an image map is by adding the ISMAP attribute to a <img> tag placed inside an anchor tag (<a>). When the user clicks somewhere in the image, the graphical browser sends the relative x,y coordinates of the mouse position to the server that is designated in the anchor. A special server program then translates the image coordinates in the HTML document.

A good use of an image map might be to locate a hotel while traveling. For instance, the user clicks on a map of the region they intend to visit, and an image of a map might return the names, addresses, and phone numbers of local accommodations.

The ISMAP and USEMAP attributes for the <img> tag tell the browser that the image is selectable by the mouse as a visual map with one or more hyperlinks.

For example:

More on Image Maps | Using Image Maps, page 2

© 2000 BLHteacher. All rights reserved.