HTML <map> name属性
例
クリック可能な領域を持つイメージマップ:
<img src="planets.gif.html"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm.html" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm.html" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm.html" alt="Venus">
</map>
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm.html" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm.html" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm.html" alt="Venus">
</map>
試してみる »
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
すべての主要ブラウザが name 属性をサポートしています。
定義と使い方
name 属性は必須で、イメージマップの名前を指定します。
name 属性は <img> タグの usemap 属性と関連付けられ、画像とマップの関係を作成します。
HTML 4.01 と HTML5 の違い
なし。
構文
<map name="mapname">
属性値
| 值 | 説明 |
|---|---|
| mapname | イメージマップの名前。 |
HTML <map> タグ その他の拡張