Html-area-tag
提供:Dev Guides
HTML-<area>タグ
説明
HTML <area>タグは、イメージマップの領域を定義するために使用されます。
例
<!DOCTYPE html>
<html>
<head>
<title>HTML area Tag</title>
</head>
<body>
<img src =/images/usemap.gif alt = "usemap" border = "0" usemap = "#tutorials"/>
<map name = "tutorials">
<area shape = "poly" coords = "74,0,113,29,98,72,52,72,38,27"
href = "/perl/index" alt = "Perl Tutorial" target = "_blank"/>
<area shape = "rect" coords = "22,83,126,125" alt = "HTML Tutorial"
href = "/html/index" target = "_blank"/>
<area shape = "circle" coords = "73,168,32" alt = "PHP Tutorial"
href = "/php/index" target = "_blank"/>
</map>
</body>
</html>
これは、次の結果を生成します-
グローバル属性
このタグは、リンク:/html/html_attributes_reference [HTML属性リファレンス]で説明されているすべてのグローバル属性をサポートします
特定の属性
HTML <area>タグは、次の追加属性もサポートしています-
Attribute | Value | Description |
---|---|---|
alt | text | Specifies an alternate text for the area. |
coords |
if shape = "rect" then coords = "left, top, right, bottom" shape = "circ"の場合、coords = "centerx、centery、radius" shape = "poly"の場合、coords = "x1、y1、x2、y2、..、xn、yn" |
Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps. |
downloadhtml-5 | filename | Specifies that the target gets downloaded when hyperlink is clicked by user. |
href | URL | Specifies the URL of a page or the name of the anchor that the link goes to. |
hreflang html-5 | language_code | Specifies the language of the target URL. |
media html-5 | media query | Specifies media/device the target URL is optimized for. |
nohref | true/false | Excludes an area from the image map |
rel html-5 | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag | Specifies relationship between the current document and the target URL |
shape | rect rectangle circ circle poly polygon | Specifies the shape of the image map |
target | _blank _parent _self _top |
Where to open the target URL. _blank-ターゲットURLは新しいウィンドウで開きます _self-ターゲットURLは、クリックされたときと同じフレームで開きます _parent-ターゲットURLは親フレームセットで開きます _top-ターゲットURLはウィンドウ全体で開きます |
type html-5 | mime_type | Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL. |
イベント属性
このタグは、link:/html/html_events_reference [HTMLイベントリファレンス]で説明されているすべてのイベント属性をサポートしています。
ブラウザのサポート
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |