HTML href property
Example
The href property specifies the target address of the link:
Absolute URL: Runoob Tutorial
Relative URL: a tag
Try it »
Browser support





All major browsers support the href property.
Definition and Usage
The href property of the tag is used to specify the URL of the hyperlink target.
If the href property is not specified for a link, the tag will not be a link.
Differences between HTML 4.01 and HTML5
In HTML5, if the tag has no href property, it will be a placeholder hyperlink.
Syntax
Attribute values
| Value | Description |
|---|---|
| URL | The URL of the hyperlink. Possible values:
|
More examples
Using anchor URLs
How to use an anchor URL with id (the name property is not supported in HTML5).
HTML