G.7. Creating and Using Image Maps

In Appendix F, we demonstrated how images can be used as hyperlinks to link to other resources on the Internet. In this section, we introduce another technique for image linking called image maps, which designates certain areas of an image (called hotspots) as links.[1] Figure G.7 introduces image maps and hotspots.

[1] Some Web browsers do not support XHTML 1.1 image maps. For this reason we use XHTML 1.0 Transitional, an earlier W3C version of XHTML. In order to validate the code in Figure G.7 as XHTML 1.1, remove the # from the usemap attribute of the img tag (line 53).

Figure G.7. Image with links anchored to an image map.
					1
					<?xml version = "1.0" ?>
					2
					<!DOCTYPE html PUBLIC
					"-//W3C//DTD XHTML 1.0 Transitional//EN" ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.