Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Link object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Link object


Link object

The Link object represents an HTML element. The element defines the relationship between the two linked documents.

The element is defined in the head section of the HTML document.


Link object properties

W3C: W3C standard.

Attributes describe W3C
charset Set or returns the character encoding of the target URL. Yes
href Set or returns the URL of the linked resource. Yes
hreflang Set or return the reference language of the target URL. Yes
media Set or return to the device type displayed by the document. Yes
rel Set or returns the relationship between the current document and the target URL. Yes
rev Set or return the relationship between the target URL and the current document. Yes
type Set or return the MIME type of the target URL. Yes

Standard properties and events

Link objects also support standard properties and events.