Easy Tutorial
❮ Event Shiftkey Jsref Shift ❯

HTML DOM


Link Object

The Link object represents a <link> element in HTML. The <link> element defines the relationship between two linked documents.

The <link> element is defined in the head section of an HTML document.


Link Object Properties

W3C: W3C Standard.

Property Description W3C
charset Sets or returns the character encoding of the target URL. Yes
href Sets or returns the URL of the linked resource. Yes
hreflang Sets or returns the base language of the target URL. Yes
media Sets or returns the type of device the document is displayed on. Yes
rel Sets or returns the relationship between the current document and the target URL. Yes
rev Sets or returns the relationship between the target URL and the current document. Yes
type Sets or returns the MIME type of the target URL. Yes

Standard Attributes and Events

The Link object also supports standard attributes and events.

❮ Event Shiftkey Jsref Shift ❯