We Recommend

HTML: The Definitive Guide HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.


Posted By

1man on 06/01/08


Tagged

attribute rel microformat rev


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

SpinZ
Wiederkehr


Difference between rel and rev attribute


Published in: HTML 


Rel and rev attributes are quite hard to get your head round, and very easy to mix up. Hopefully this snippet will explain the difference.

  1. <!-- Imagine the current page is a contact page -->
  2. <!-- The rel attribute -->
  3. <!--
  4. Describes the relationship between the current document and the page linked to in the href.
  5. e.g. From the current page(contact), the page being linked to is it's help page.
  6. -->
  7. <a href="http://mydomain.com/help" rel="help">Help</a>
  8.  
  9. <!-- The rev attribute -->
  10. <!--
  11. The opposite of the rel attribute. The relationship between the linked document(help)
  12. and the current document(contact).
  13. NOTE: This is considered overkill. rev is mainly used in the vote-links microformat.
  14. -->
  15. <a href="http://mydomain.com/help" rel="help" rev="contact">Help</a>

Report this snippet 

You need to login to post a comment.