w3resource

HTML nohref attribute

nohref

The purpose of the HTML nohref attribute is to define a region (of an imagemap) which does not have a hyperlink.

Supported elements

HTML nohref attribute supports area element.

Syntax

<area nohref="value" >.....</area>

Type of value

Predefined.

Value

nohref.

Default value

There is no default value of HTML nohref attribute.

Supported doctypes

HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.

Example of HTML nohref attribute with area

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML nohref attribute with area</title>
</head>
<body>
<img src="../../html/attributes/attribute-name-example.gif" alt="name    example " width="308" height="190" border="0" usemap="#Map">
<map name="Map">
<area shape="rect" coords="8,5,100,77"   href="../../mysql/mysql-tutorials.php" target="_blank" alt="mysql   tutorial" / >
<area shape="circle" coords="155,93,59" href="../../php/php-home.php" target="_blank" alt="php tutorial / >
<area shape="rect" coords="197,136,306,188" nohref="nohref" alt="sql tutorials" / >
</map>
</body>
</html>

Result

html nohref attribute with area

View this example in a separate browser window

Example of HTML nohref attribute with area

Previous: HTML name attribute
Next: HTML noresize attribute

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/html/attributes/html-nohref-attribute.php