Skip to: content, navigation

by Ian Lloyd

rev (HTML attribute)

Browser support full matrix
IE7 FF2 Saf3 Op9.5
None None None None
Spec
Depr. Version
No HTML 2
rev="
{ alternate | bookmark | chapter | contents | copyright | glossary | help | index | next | prev | section | start | stylesheet | subsection | other (user-defined) }
"

Example

The rev is used to identify this page as the parent for the categories page:

<link rel="subsection" rev="parent" href="categories.html" />

Description

While the rel attribute defines the relationship of the referenced document or resource, the rev attribute is effectively the reverse of that - it defines what the referenced document would classify this document as. To use a simple example, let’s assume we have some pages in a site that have a relationship whereby one page is an index page that contains references and links to a number sub-section pages. The index page could contain the following, identifying that the categories page is a subsection:

<link rel="subsection" href="categories.html" />

In the categories page, you could have:

<link rel="parent" href="index.html" />

Now, these only use the rel attribute, and you only see the complete pattern of parent page and subsection when you see both HTML snippets together, but of course these are on separate pages. By using the rev attribute, you can make it clear what the relationship is between pages in both directions. So the two snippets above become:

<link rel="subsection" rev="parent" href="categories.html" />
<link rel="parent" rev="subsection" href="index.html" />

Value

Refer to the syntax diagram for the acceptable pre-defined values. However, you are not limited to these alone - you can define your own rev attribute value, but it will not be of much use to any web browser (although you might be able to use that information for some other purpose, for example querying/accessing using JavaScript and the DOM).

Compatibility

IE5.5None
6.0None
7.0None
Firefox1.0None
1.5None
2.0None
Safari1.3None
2.0None
3.0None
Opera9.2None
9.5None

The support charts for this element show as ‘none’ as no browser really does anything useful with this attribute, or changes the behavior of anything on the page in any way as a result. The real value of adding a rev attribute is gained either from plugging in extra functionality using JavaScript and the DOM or through a centralised web service of some kind that may be able to make use of the attribute’s content.

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters