HTML <area> nohref 属性
标签" href="tag-main.html"><main>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<html>
<picture>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
< template>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
HTML <area> nohref 属性
实例
带有可点击区域的图像映射,并使用 nohref 属性:
<img src="planets.gif"
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" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" 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" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
浏览器支持
目前所有主流浏览器都不支持 nohref 属性。
定义和用法
HTML5 中 <area> 标签不再支持 nohref 属性。
nohref 属性是一个 boolean(布尔) 属性。
该属性指定一个区域没有关联链接。
提示: nohref 属性指明 <area> 标签没有关联链接。更简单的方式是不使用 href 属性。
HTML 和 XHTML 之间的差异
在 XHTML 中,属性最小化是被禁止的, nohref 属性必须定义为<area nohref="nohref" />。
语法
<area nohref>