Link rel attribute
Definition and Usage
rel
The attribute settings or returns a space-separated list that defines the relationship between the current document and the linked document.
See also:
HTML Reference Manual:HTML <link> rel Attribute
HTML Reference Manual:HTML <link> Tag
Example
Returns the relationship between the current document and the linked document:
var x = document.getElementById("myLink").rel;
Syntax
Return the rel attribute:
linkObject.rel
Set the rel attribute:
linkObject.rel = Relationship
Attribute value
Value | Description |
---|---|
alternate | The linked page is the alternate version of the current document. |
appendix | The linked page is the appendix page of the current document. |
chapter | References a chapter. |
contents | The linked page is the table of contents of the current document. |
copyright | The linked page is the copyright/policy of the current document. |
glossary | The linked page is the glossary page of the current document. |
help | The linked page is the help page of the current document. |
icon | References the location of the icon. |
index | The linked page is the index page of the current document. |
next | References the next page. |
offline | References the location containing the CDF file path. |
prev | References the previous page. |
search | References an XML file in OpenSearch description format. |
section | Links to a specific section within the document list. |
sidebar | Reference the bookmark panel. |
start | Reference the home page (used by search engines to display the home page). |
stylesheet | The linked page is the stylesheet of the current document. |
subsection | The linked page is a section of the current document. |
Technical Details
Return Value: | A string value representing a list of relationship types separated by spaces. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |