Best way to add metadata to HTML elements
Go ahead and use an attribute for this, but use a data-
prefix on it. Attributes with the prefix data-
are explicitly allowed on all elements as of HTML5. Example:
<a href="#" class="Theme-Button" data-theme="{style: 'win2007', icon: 'left', align:'center', fullWidth: true}"></a>
It works today in all browsers, and because it's now specified behavior, it's future-proofed.
Use jquery's ".data" property. This is very handy and many people don't know about it.
See this link for more information.