HTML DOM LinkObject


Link Object

The Link object represents an HTML <link> element. The <link> element can define 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 device type on which the document will be displayed. 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 Properties and Events

The Link object also supports standardPropertiesandEvents。

Other Extensions