Latest web development tutorials

HTML DOM Area noHref property

Area Object Reference Area objects

Definition and Usage

noHref nohref property sets or returns the property value of a region.

nohref attribute specifies an area not related links.

Tip: nohref attribute tells the browser Hyperlink property does not exist.You can not use the href attribute to a simpler set no related links.

grammar

areaObject.noHref=true|false


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

In addition to IE browser, all major browsers support noHref property.


Examples

Examples

The following example returns the image map "noHref" Properties "Venus" area:

<html>
<body>

<img src="planets.gif"
width="145" height="126"
usemap="#planetmap">

<map name="planetmap">
<area id="venus" shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.htm"
nohref="nohref">
</map>

<p>Value of nohref attribute for the "Venus" area is:
<script>
document.write(document.getElementById("venus").noHref);
</script>
</p>

</body>
</html>

Examples of the above output:

Value of nohref attribute for the "Venus" area is: true

try it"


Area Object Reference Area objects