<img src="img/map1.gif" alt="map" width="240" height="80" border="0" usemap="#m1">
<map name="m1">
<area shape="rect" coords="10,10,70,70" href="anchor2.htm" alt="rect">
<area shape="circle" coords="120,40,30" href="anchor2.htm" alt="circle">
<area shape="poly" coords="196,9,171,31,179,66,213,70,227,33" href="anchor2.htm" alt="pentagon">
</map>
img要素の属性値
usemap="URI"
より仕様書では、他文書中のイメージマップを利用できることになっていますが、実際には同一文書内のものしか利用できません。従って、[#]記号を頭につけた属性値での指定となります。
<img src="img/map2.gif" alt="map2" width="240" height="80" border="0" usemap="#m2">
<map name="m2">
<area shape="rect" coords="10,10,70,70" href="anchor2.htm#sec1" alt="rect">
<area shape="circle" coords="120,39,30" href="anchor2.htm#sec2" alt="circle">
<area shape="poly" coords="194,10,171,32,180,66,213,69,228,34,195,10" href="anchor2.htm#sec3" alt="pentagon">
</map>
↓
<a name="sec1">section1</a>
<a name="sec2">section2</a>
<div id="sec3">section3</div>