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 semantics.</p>

<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;</ code></pre>

<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>

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

<p>...which would be read as "&lt;this document&gt; is a vote-for http://supr.c.ilio.us/blog/";.</p>

<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 described.</p>
_______________________________________________
microformats-discuss mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to