Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML area href property

HTML href property

HTML area Tag Reference HTML tag

Example

An image map with clickable areas:

Planets

usemap="#planetmap">

Sun Mercury Venus

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the href property.


Definition and Usage

The href property specifies the target of the link in the area.

If the href property is not used, the tag is not a link.


Differences between HTML 4.01 and HTML5

In HTML5, the tag no longer uses the href property; use placeholder to specify the link.


Syntax

Attribute values

Value Description
URL

The URL of the link. Possible values:

  • Absolute URL - points to another site (e.g., href="http://www.example.com/sun.htm")
  • Relative URL - points to a file within the site (href="sun.htm")
  • Anchor URL - points to an anchor on the page (href="#sun")
  • |

    HTML area Tag Reference HTML tag