HTML rev Attribute

The obsolete HTML rev attribute was historically used with links to describe a relationship in the reverse direction, from the linked resource back to the current document.

Historical Syntax

The rev attribute could be used with hyperlink elements such as <a> and <link>:

<a href="chapter-2.html" rev="prev">Chapter 2</a>

The value described a relationship from the linked resource back toward the document containing the link, rather than the forward relationship described by rel.

Historical Elements

The obsolete rev attribute was historically associated with the <a> and <link> elements.

Element Historical Purpose
<a> Described a reverse relationship between a linked resource and the current document.
<link> Described a reverse relationship between an external resource and the current document.

Historical Use

Link relationships have a direction. The current rel attribute describes how the resource identified by href relates to the document containing the link. The historical rev attribute described the relationship in the opposite direction.

For example, older markup could use a reverse relationship to indicate that the current document had a particular relationship when viewed from the linked resource.

<link href="chapter-1.html" rev="next">

Reverse relationships were more difficult to read and understand because authors had to mentally reverse the direction of the relationship when interpreting the markup.

Why It Became Obsolete

The rev attribute duplicated the link relationship concept while expressing it in the opposite direction from rel. This made link markup more complicated than necessary and could make the intended relationship difficult to understand.

Modern HTML uses rel to express link relationships in a consistent direction. When converting old markup, the relationship must be reconsidered from the current document toward the linked resource rather than simply changing the attribute name.

Modern Alternative

Remove the obsolete rev attribute and express the intended relationship using rel when an appropriate modern link type exists.

Historical HTML

<a href="chapter-2.html" rev="prev">Chapter 2</a>

Modern HTML

<a href="chapter-2.html" rel="next">Chapter 2</a>

In the historical example, rev="prev" says that the current document is previous when the relationship is viewed from chapter-2.html. Expressing the relationship in the modern forward direction makes chapter-2.html the next document, so rel="next" is used.

Legacy Browser Support

The rev attribute appeared in older HTML specifications and may still be encountered in legacy documents, particularly in older hyperlink and document metadata markup.

Modern webpages should not rely on rev. Use the current rel attribute when a defined link relationship is needed.

For additional information about historical browser compatibility, visit Can I Use? . Search for the HTML element or attribute you want to check. Search results can include related HTML features, element attributes, APIs, and other technologies, so select the result that most closely matches the legacy feature you are researching.

Other attributes associated with links and link relationships include:

  • rel - Describes the relationship from the current document to the linked resource.
  • href - Specifies the URL of the linked resource.
  • methods - An obsolete attribute historically used to describe methods associated with a linked resource.
  • urn - An obsolete attribute historically associated with persistent identifiers for linked resources.

Specifications

The rev attribute on <a> and <link> elements is obsolete and must not be used by authors. Authors should use rel to express an appropriate relationship in the forward direction. See the WHATWG HTML Living Standard for information about obsolete and non-conforming features.