JavaScript String Object
The link() method is used to display a string as a hyperlink.
This method returns the string embedded in the <a> tag, like this:
<a href="url">string</a>
| Parameter | Description |
|---|---|
| url | Required. The URL to link to |
![]()
The link() method is supported in all major browsers.
Display the text: "Free Web Building Tutorials!" as a hyperlink:
JavaScript String Object
Your message has been sent to W3Schools.