Have you ever wondered what the rev attribute does? I would not be surprised, because it has no explicit usage like the rel attribute does (take the nofollow value as an example).
From what I can gather it seems that the rev attribute was widely ignored or misunderstood, which has has lead it to be under used, so let’s explore it’s meaning shall we?
Definition
Here is how the rev attribute is described in the HTML 4.01 specification and HTML 4 specification:
- rev: This attribute is used to describe a reverse link from the anchor specified by the href attribute to the current document.
The value of this attribute is a space-separated list of link types.
Example
Lets say that your company runs a blog, and that the blog has multiple authors, and you have decided to create a bio page for each author, so that you can link to the authors bio page from every article that the person writes.
When you create a link on the blog article’s page to the author page, you would/should use the ‘author’ link type, and the result would look something like:
<a title="Erik Vold - VKI Studio's Blog" rel="author" href="/blog/authors/erikvold/index.cfm">Erik Vold</a>
In English, I read the above link as: Erik Vold is the author of this page.
But with the above there is currently only one way to identify that Erik Vold wrote blog post X, which is to navigate to the blog post X and viewing the rel attribute of the link described above.
What we should want in addition to the above is a way to identify all of the blog posts in the VKI blog written by Erik Vold on the /blog/authors/erikvold/index.cfm page, because this will give any entity that is browsing the VKI blog two methods of identifying the authorship of any given blog post.
So if this question is ever asked: “what other posts has Erik written?” it can be answered simply and quickly by reviewing the author page for Erik. Without this option every blog post would have to be scanned.
To implement the signal(s) (on the author page) of pages authored, we would add the rev attribute to either an a tag or link tag which links to the blog post of interest, here is an example using the a tag:
<a title="Blog Post Title - VKI Studio's Blog" rev="author" href="/blog/...">Blog Post Title</a>
In English, I read the above link as: Erik Vold is the author of that page.
Here are some other examples of how to use the rev attribute:
- REV attribute of the anchor tag – Introduction to HTML
- Difference between rel and rev attribute – Snipplr
- The Difference Between REL and REV attributes of the A Tag (or REL vs. REV) – Erik Vold’s Blog
HTML 5
If you are already familiar with the rev attribute or HTML 5, then you might have already noticed that the rev attribute is missing in the HTML 5 specification.
I have tried to find the reasoning behind this, and so far have found no reason at all except some hints in fourms and the like that it was removed because it was under used, or misused, and this somehow justifies removing it—which needless to say is a terrible argument.
Furthermore the fact that I cannot find any real documentation on the reason the change was made makes me think the reason is so weak that no one wanted to state it, and that lack of substance is reason enough for me to ignore the HTML 5 specification in this instance (it’s just a draft at the moment anyhow).
So to conclude, my advice is to definitely use the rev attribute, regardless of the HTML 5 specification, because it has a clear purpose which is not fulfilled otherwise.