<map> and </map>

PURPOSE: To make a imagemap having different links from one image. Different areas of the image are defined as different hyperlinks.

Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.

The three shapes for imagemaps are rectangle, circle and polygon. An example of each is listed in the html code.


<html>
<head>
<title>Imagemap</title>
</head>
<body>
<img src="image1.gif" usemap="#example1" border="0" />
<map name="example1">

<area shape="rect coords="30,30,59,59" href="http://www.somewhere.com">
</map>

<img src="image2.gif" usemap="#example2" border="0" />
<map name="example2">

<area shape="circle" coords="30,30,59,59" href="http://www.somewhere.com">
</map>

<img src="image3.gif" usemap="#example3" border="0" />
<map name="example3">

<area shape="polygon" coords="x1,y1, x2,y2, .., xn,yn" href="http://www.somewhere.com">
</map>

</body>
</html>


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples