Jump to content

"rel" vs "rev" attribute (<a> tag)


Laurent

Recommended Posts

Hi,I don't understand the difference between the rel and the rev attribute of a <a> tag.My previous post was about "how to replace the target attribute in XHTML Strict" and the answer was "use the rel attribute" instead.Can someone explain me the differences between the two attributes please ?on this page, rel and rev attributes are describe identicaly.ThanksLaurent

Link to comment
Share on other sites

I think they refer to the english words "relation" and "reverse" or so.There is a difference in direction, the rel attribute describes the relation of the document you're targeting to the current one, and the rev attribute is the other way round. I don't have a clue actually what effect it has, lol, I only need one of them: rel. I use it in the <link /> attribute for my stylesheet, if I have one. Actually I've never realised both the attributes were allowed with the anchor too :)

Link to comment
Share on other sites

rel describes what's the other document to the current. rev describes what's the current document to the other one. The opposite of rel in other words.The perfect example of what I mean would be human relationships. A person next to you might be your father for example. That's what he is to you. You are his son. That's what you are to him.

Link to comment
Share on other sites

I think it's used in certain alternative browsers, because I've also seen <link> used in a weird way on w3.org:http://www.w3.org/TR/REC-html40/struct/links.html#h-12.3It's possible it's used for alternative navigation through sites for people who can't use a mouse to click different links for example, who maybe can only use a keyboard or something to navigate back and forth. In that case I guess we're talking level AAA accessibility. <LINK rel="Index" href="../index.html"> <LINK rel="Next" href="Chapter3.html"> <LINK rel="Prev" href="Chapter1.html">

Link to comment
Share on other sites

That could also be usefull in browsers such as Opera for example. If you just enable the Navigation Bar you'll see what I'm talking about. Just imagine a site that fills all of the gaps there :) .But that still doesn't explain the rev attribute though. I too wonder myself why would a document need to specify what it is to the other one? I can't think of a single use case.

Link to comment
Share on other sites

*is baffled*I guess it's one of life's great mysteries. A universal question perhaps? :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...