Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Link rel Property

Link rel Property

Link Object Reference Link Object


Definition and Usage

The rel attribute specifies the relationship between the current document and the linked document.

Syntax

Set the rel attribute:

linkObject.rel="

relationship

"

Return the rel attribute:

linkObject.rel

Attribute values:

Value Description
alternate An alternate version of the document (such as a print page, a translation, or a mirror).
stylesheet An external style sheet for the document.
start The first document in a collection.
next The next document in a collection.
prev The previous document in a collection.
contents The table of contents of the document.
index The index of the document.
glossary A glossary (explanation) of terms used in the document.
copyright A document containing copyright information.
chapter A chapter of the document.
section A section of the document.
subsection A subsection of the document.
appendix An appendix of the document.
help A help document.
bookmark A related document.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the rel attribute

Note: Opera or Safari does not support the "search" value.

Note: IE, Safari, or Chrome does not support "sidebar".


Example

Example

Display the relationship between the current document and the linked document:

Runoob Tutorial(runoob.com)

Try it »


Link Object Reference Link Object