rev (HTML attribute)
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
| IE | 5.5 | None |
|---|---|---|
| 6.0 | None | |
| 7.0 | None | |
| Firefox | 1.0 | None |
| 1.5 | None | |
| 2.0 | None | |
| Safari | 1.3 | None |
| 2.0 | None | |
| 3.0 | None | |
| Opera | 9.2 | None |
| 9.5 | None |
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.

