HTML <img> usemap属性

❮HTML<img>タグ

クリック可能な領域を含む画像マップ:

<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>

定義と使用法

このusemap属性は、画像をクライアント側の画像マップとして指定します(画像マップはクリック可能な領域を持つ画像です)。

このusemap属性は要素のname属性に関連付けられており、との <map> 間に関係を作成します <img><map>

注:要素がor要素の子孫である場合、このusemap属性は使用できません <img><a> <button>


ブラウザのサポート

Attribute
usemap Yes Yes Yes Yes Yes

構文

<img usemap="#mapname">

属性値

Value Description
#mapname A hash character ("#") plus the name of the <map> element to use

❮HTML<img>タグ