I used rel values in jQuery for the parametrized (#!hashbang) AJAX calls.
<a id='_qualifier' rel='telephony' href='contact.php'>contact</a>
and with jQuery:
var hashbang = "#!"+$("#_qualifier").attr('rel'); //gives desired result=>"#!telephony"
But, when I validated the page on validator.w3.org, it gave me error:
Bad value #telephony for attribute rel on element a: Keyword #telephony is not registered.
I searched around and according to the HTML5 specs here and here, the rel attribute should have the registered/pre-defined values.
- Is there a work around to use custom values for rel in HTML5, without failing the validation?
- Is it also invalid for HTML4 doctypes?
You can use custom attributes:
It is HTML5 compliant, but not HTML4 or xHTML. You'll access the attribute just like you did with jQuery.
You can find more informations on the HTML5 reference.