Creating an Image Map
You have seen how to make an image function as a hyperlink, but sometimes you might want different areas of the image to hyperlink to different locations. For example, suppose you have a map of the United States, and want users to be able to click on their state to view a page containing information specific to their location. To create such an effect, you must use an image map.
An image map is an overlay for a graphic that assigns hyperlinks to certain defined areas (hotspots) on the image. The hotspots can be rectangular, circular, or irregularly shaped (called a poly hotspot).
A rectangular hotspot’s position is defined by two points: its upper-left and lower-right corners. Each point is expressed as a pair of numbers that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access