--- title: <map> slug: Web/HTML/Element/map tags: - Element - HTML - HTML embedded content - Multimedia - Reference - Web translation_of: Web/HTML/Element/map --- <div>{{HTMLRef}}</div> <p><strong>HTML の <code><map></code> 要素</strong>はイメージマップ (クリック可能なリンク領域) を定義するために {{HTMLElement("area")}} 要素とともに使用します。</p> <div>{{EmbedInteractiveExample("pages/tabbed/map.html", "tabbed-standard")}}</div> <div class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div> <table class="properties"> <tbody> <tr> <th scope="row"><a href="/ja/docs/Web/HTML/Content_categories">コンテンツカテゴリ</a></th> <td><a href="/ja/docs/Web/HTML/Content_categories#Flow_content">フローコンテンツ</a>、<a href="/ja/docs/Web/HTML/Content_categories#Phrasing_content">記述コンテンツ</a>、知覚可能コンテンツ</td> </tr> <tr> <th scope="row">許可されている内容</th> <td>すべての<a href="/ja/docs/Web/HTML/Content_categories#Transparent_content_model">透過的</a>要素</td> </tr> <tr> <th scope="row">タグの省略</th> <td>{{no_tag_omission}}</td> </tr> <tr> <th scope="row">許可されている親要素</th> <td><a href="/ja/docs/Web/HTML/Content_categories#Phrasing_content">記述コンテンツ</a>を受け入れるすべての要素</td> </tr> <tr> <th scope="row">暗黙の ARIA ロール</th> <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">対応するロールなし</a></td> </tr> <tr> <th scope="row">許可されている ARIA ロール</th> <td>許可されている <code>role</code> なし</td> </tr> <tr> <th scope="row">DOM インターフェイス</th> <td>{{domxref("HTMLMapElement")}}</td> </tr> </tbody> </table> <h2 id="Attributes" name="Attributes">属性</h2> <p>この要素は<a href="/ja/docs/Web/HTML/Global_attributes">グローバル属性</a>を持っています。</p> <dl> <dt>{{htmlattrdef("name")}}</dt> <dd><code>name</code> 属性は、マップを参照可能にするための名前を与えます。この属性は指定しなければならず、値は空文字列ではなく空白文字を含まないものにしなければなりません。 <code>name</code> 属性の値は、同一文書内の別の <code><map></code> 要素の <code>name</code> 属性の値と compatibility-caseless 方式で一致してはいけません。 {{htmlattrxref("id")}} 属性も指定した場合は、両方の属性の値を同一にしなければなりません。</dd> </dl> <h2 id="Examples" name="Examples">例</h2> <pre class="brush: html notranslate"><map name="primary"> <area shape="circle" coords="75,75,75" href="left.html"> <area shape="circle" coords="275,75,75" href="right.html"> </map> <img usemap="#primary" src="https://placehold.it/350x150" alt="350 x 150 pic"> </pre> <h3 id="Result" name="Result">結果</h3> <p>{{ EmbedLiveSample('Examples', '350', '166', '', 'Web/HTML/Element/map') }}</p> <h3 id="Expected_live_example_output" name="Expected_live_example_output">想定されるライブ例の結果</h3> <p>上の live example は、(キーボードの Tab キーを使用すると) 以下の画像のようになるはずです:</p> <p><em><code>left.html</code> へのリンク:</em><br> <img alt="" src="https://mdn.mozillademos.org/files/14595/Screen%20Shot%202017-02-02%20at%2010.48.40%20PM.png" style="height: 156px; width: 356px;"></p> <p><em><code>right.html</code> へのリンク</em><br> <img alt="" src="https://mdn.mozillademos.org/files/14597/Screen%20Shot%202017-02-02%20at%2010.49.04%20PM.png" style="height: 157px; width: 355px;"></p> <h2 id="Specifications" name="Specifications">仕様書</h2> <table class="standard-table"> <thead> <tr> <th scope="col">仕様書</th> <th scope="col">状態</th> <th scope="col">備考</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('HTML WHATWG', 'embedded-content.html#the-map-element', '<map>')}}</td> <td>{{Spec2('HTML WHATWG')}}</td> <td></td> </tr> <tr> <td>{{SpecName('HTML5 W3C', 'semantics-embedded-content.html#the-map-element', '<map>')}}</td> <td>{{Spec2('HTML5 W3C')}}</td> <td></td> </tr> <tr> <td>{{SpecName('HTML4.01', 'struct/objects.html#h-13.6.1', '<map>')}}</td> <td>{{Spec2('HTML4.01')}}</td> <td>初回定義</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> <p>{{Compat("html.elements.map")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>{{HTMLElement("a")}}</li> <li>{{HTMLElement("area")}}</li> </ul>