Attributes > Classes: Custom DOM Attributes for Fun and Profit

XHTML gives us the ability to extend our markup with customized, semantically meaningful attributes. While the battle between class and attribute might be a holy war to some (and unknown to most others) the fact remains that attribute name value pairs are easier to read and understand, and only attributes allow you to associate a value with your meta-data. Extending XHTML elements in my projects has made me think of how to solve problems in new and better ways. It has made me a stronger JavaScript artisan. In this article, I explain several examples and provide functions for working with your own custom attributes.

http://digg.com/programming/Attributes_Classes_Custom_DOM_Attributes_for_Fun_and_Profit

Sorry, comments are closed for this post.