HTML <area> nohref属性
例
クリック可能な領域を持つ画像マップで、nohref 属性を使用します:
<img src="planets.gif.html"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" nohref 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>
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" nohref 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>
試してみる »
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
現在、すべての主要ブラウザは nohref 属性をサポートしていません。
定義と使い方
HTML5 では <area> タグは nohref 属性をサポートしなくなりました。
nohref 属性は boolean(ブール)属性です。
この属性は、領域にリンクが関連付けられていないことを指定します。
ヒント:nohref 属性は、<area> タグに関連付けられたリンクがないことを示します。より簡単な方法は、href 属性を使用しないことです。
HTML と XHTML の違い
XHTML では、属性の最小化は禁止されており、nohref 属性は <area nohref="nohref.html" /> と定義する必要があります。
構文
<area nohref>
他の拡張
HTML <area> タグ