HTML5不支持 <area> /tags/nohref属性,/tags/nohref属性是一个布尔属性。存在时,它指定区域没有关联的链接。
在线示例
具有可点击区域和/tags/nohref属性的图像地图:
<!DOCTYPE html> <html> <title>HTML:<area> /tags/nohref 属性 - 大卫编程网 div.cn</title> <body> <p>单击太阳或其中一个行星以近距离观察它:</p> <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap"> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" /tags/nohref alt="Sun"> <area shape="circle" coords="90,58,3" href="/tags/mercur.html" alt="Mercury"> <area shape="circle" coords="124,58,8" href="/tags/venus.html" alt="Venus"> </map> </body> </html>测试看看 ‹/›
浏览器兼容性
IEFirefoxOperaChromeSafari
目前所有主流浏览器都不支持 /tags/nohref 属性。
定义和用法
HTML5不支持<area> /tags/nohref属性。
/tags/nohref属性是一个布尔属性。
存在时,它指定区域没有关联的链接。
提示: /tags/nohref 属性指明 <area> 标签没有关联链接。更简单的方式是不使用 href 属性。
HTML 和 XHTML 之间的差异
在 XHTML 中,属性最小化是被禁止的, /tags/nohref 属性必须定义为<area /tags/nohref="/tags/nohref" />。
语法
<area /tags/nohref>