Hoeveel kwaad kan het om eigen attributes aan een HTML tag toe te voegen?
Ik heb bijvoorbeeld een link gemaakt:
Dit omdat ik niet alles in een rel attribute wil stoppen. Dat het vast niet de beste oplossing is snap ik, maar hoe common is dit? Gebeurt dit vaker? Kan het kwaad?
Overigens lees ik dat het in HTML5 mogelijk is:
Ik heb bijvoorbeeld een link gemaakt:
HTML:
1
| <a href="#" group='group1' member='naam1'>delete</a> |
Dit omdat ik niet alles in een rel attribute wil stoppen. Dat het vast niet de beste oplossing is snap ik, maar hoe common is dit? Gebeurt dit vaker? Kan het kwaad?
Overigens lees ik dat het in HTML5 mogelijk is:
In HTML 5, you define custom attributes using the "data" attribute. The exact format is "data-*", where "*" is replaced with the desired custom attribute name, then set to the desired string value.
<div id="mydiv" data-brand="toyota" data-model="prius">
John is very happy with his Toyota Prius, because he saves on gas.
</div>
[ Voor 36% gewijzigd door ViNyL op 09-07-2009 11:40 ]