You are here: Reference > JavaScript > client-side > HTML DOM > properties > rev (a, link)

rev property (a, link)

Browser support:
Specifies or returns a reverse relationship from an anchor or link to the current document.
This property contains information for the author only, there isn't any functionality assigned to this property.

Syntax:

object.rev;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: rev

Possible values:

String that sets or retrieves a space-separated list of relation types.
The list of the supported relation types:
Alternate
Designates substitute versions for the document in which the link occurs.
Appendix
Page that is an appendix for the set of pages.
Bookmark
Bookmark.
Chapter
Refers to a document serving as a chapter in a collection of documents.
Contents
Refers to a document serving as a table of contents.
Copyright
Copyright notice.
Glossary
Glossary for the page.
Help
Help document.
Index
Refers to a document providing an index for the current document.
Next
Refers to the next document in a sequence.
Prev
Refers to the previous document in a sequence.
Section
Page that is a section for a set of pages.
Start
Refers to the first document.
Stylesheet
Refers to an external style sheet.
Subsection
Page that is a subsection for a set of pages.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the rev attribute:
<a name="topBookmark" href="#bottomBookmark" rev="Bookmark">Jump to the bottom of the page</a>
<div style="height:2000px"></div>
<a name="bottomBookmark" href="#topBookmark" rev="Bookmark">Jump to the top of the page</a>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the rev property:
<head>
    <script type="text/javascript">
        function GetRelationType () {
            var anchor = document.getElementById ("firstAnchor");
            alert ("The rev property of the first anchor is: " + anchor.rev);
        }
    </script>
</head>
<body>
    <a id="firstAnchor" name="topBookmark" href="#bottomBookmark" rev="Bookmark">Jump to the bottom of the page</a>
    <br/><br/><br/>
    <button onclick="GetRelationType ();">Get relation!</button>
    <div style="height:2000px"></div>
    <a name="bottomBookmark" href="#topBookmark" rev="Bookmark">Jump to the top of the page</a>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content