Anchor rel and rev Properties
Anchor Object
Definition and Usage
The rel property can set or return the relationship to the target document.
The rev property can set or return the reverse relationship of a link.
The rel (relationship) attribute specifies the relationship from the source document to the target document.
The rev (reverse) attribute specifies the reverse relationship from the target document to the current document.
Syntax
Set the rel attribute:
anchorObject.rel="
relationship
"
Set the rev attribute:
anchorObject.rev="
relationship
"
Return the rel attribute:
anchorObject.rel
Return the rev attribute:
anchorObject.rev
Both attributes can take the following values:
| Value | Description |
|---|---|
| alternate | Links to an alternative source. |
| stylesheet | External style sheet of the document. |
| start | Links to the first page of the current document. |
| next | Links to the next document in the collection. |
| prev | Links to the previous document in the collection. |
| contents | Links to the table of contents of the current document. |
| index | Links to the index of the current document. |
| glossary | Links to the glossary of the current document. |
| copyright | Links to the copyright or privacy page of the current document. |
| chapter | Links from the current document to a section. |
| section | Links to a subsection in the document list. |
| subsection | Links to a sub-subsection in the current document list. (A subsection may have multiple sub-subsections.) |
| appendix | Links to the appendix page of the document. |
| help | Help document. |
| bookmark | Links to a bookmark. |
| nofollow | The nofollow tag is an "anti-spam link" tag pioneered by Google, used to instruct search engines not to track (i.e., crawl) any outbound links on a web page that have the nofollow attribute, in order to reduce the dilution of a site's ranking by spam links! |
| licence | |
| tag | |
| friend |
Browser support





All major browsers support the rel and rev properties.
Note: Browsers do not use these attributes in any way. However, search engines can use these attributes to obtain more information about links.
Example
Example
Returns the relationship between the current document and the linked document: