Anchor Object
The href property sets or returns the value of the href attribute of a link.
The href attribute specifies the destination of a link.
Set the href property:
Return the href property:
| Value | Description |
|---|---|
| URL | Specifies the URL of the target |
![]()
The href property is supported in all major browsers.
Return the value of the href attribute of a specific link:
The output of the code above will be:
Anchor Object
Your message has been sent to W3Schools.