Difference between rel and rev attribute

/ Published in: HTML
Save to your folder(s)

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.

Copy this code and paste it in your HTML
  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>
  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


RSS Icon Subscribe to comments

You need to login to post a comment.