Transforming an Image into a Clickable Link

Chapter 6 shows you how to convert text into hyperlinks, but you can also turn images into hyperlinks and create your own image maps. An image map is a graphic image that contains several hotspots that link to different resources. Image maps are useful for creating navigation bars and other creative, image-based navigation objects. The following sections show you how to use an image as a link and create your own image map.

Using an Image as a Link

To transform an image into a hyperlink, enclose the <img> tag with opening and closing <a> tags, like so:
157
This doesn’t change the appearance of the image ...

Get The Complete Idiot's Guide® To HTML5 and CSS3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.