Easy Tutorial
❮ Prop Submit Form Dom Obj Menuitem ❯

JavaScript link() Method


Definition and Usage

The link() method is used to display a string as a hyperlink.

This method returns a string enclosed in <a> tags, as shown below:

<a href="url">string</a>

Syntax

Parameter Description
url Required. The URL to link to

Browser Support

All major browsers support the link() method.


Example

Display the string "Free Web Building Tutorials!" as a link:

❮ Prop Submit Form Dom Obj Menuitem ❯