[uf-discuss] draft blog post on rel vs. rev

Ryan King ryan at technorati.com
Thu Dec 1 17:47:01 PST 2005

I sometimes mail draft blog posts around to select people for review.  
In an experiment on openness and collaboration, I'm gonna try the  
whole list this time. Apologies for the markup, which may be tough to  
read. Any (constructive) comments welcome. If I hear nothing I'll  
post it later tonight.

Title: Rel vs. Rev

<p>Another note in my very-neglected series on Semantic XHTML basics  
<a href="http://www.microformats.org/blog/2005/10/19/more-than- 
styling/">started awhile back</a>.</p>

<p>It seems that everytime I present microformats, I need to explain  
the difference bettween the <a href="http://www.w3.org/TR/REC-html40/ 
struct/links.html#adef-rel">rel</a> and <a href="http://www.w3.org/TR/ 
REC-html40/struct/links.html#adef-rev">rev</a> attributes. Its  
understandable that most people don't grasp the difference, as I'm  
sure most webdevelopers haven't needed to make use of these  

<p>First of all, <code>rel</code> is an attribute which can be  
applied to <code>&lt;a&gt;</code> and <code>&lt;link&gt;</code> to  
define the relationship between the linked document and the current  
one. So, a very common example is a link to a feed. This blog has:</p>

<pre><code>&lt;link rel="alternate" type="application/rss+xml"  
title="RSS 2.0" href="http://www.microformats.org/feed/" /&gt;</ 

<p>This can be read as <code>http://microformats.org/feed/</code> is  
an <code>alternate</code> for <code>http://microformats.org/</code>  
(Incidentally, the feed could link to this blog with  
<code>rev="alternate"</code>, which would have <a href="http:// 
www.w3.org/TR/REC-html40/struct/links.html#h-12.3.1">exactly the same  
meaning</a>. More on <code>rev</code> in a minute.).</p>

<p><code>rel</code> is used by <a href="http://www.gmpg.org/ 
xfn/">XFN</a>, <a href="http://microformats.org/wiki/rel-tag">rel- 
tag</a>, <a href="http://microformats.org/wiki/rel-directory">rel- 
directory</a> and <a href="http://microformats.org/wiki/rel- 
payment">rel-payment</a> microformats.</p>

<p>Now, <code>rev</code> is just like <code>rel</code>, but the  
relationship is reversed (I think of rev as "reverse relationship").  
It get used in the <a href="http://microformats.org/wiki/vote- 
links">vote-links</a> microformat like this:</p>

&lt;a href="http://supr.c.ilio.us/blog/" rev="vote-for" title="supr  
snark"&gt;supr.c.ilio.us rocks!&lt;/a&gt;

<p>...which would be read as "&lt;this document&gt; is a vote-for  

<p>rel and rev are useful for describing the relationships between  
two resources on the web. Remember, it is only the relationship  
between the documents, not the documents themselves which are  

More information about the microformats-discuss mailing list