So what if custom HTML attributes aren't valid XHTML?
I know that is the reason some people don't approve of them, but does it really matter? I think that the power that they provide, in interacting with JavaScript and storing and sending information from and to the server, outweighs the validation concern. Am I missing something? What are the ramifications of "invalid" HTML? And wouldn't a custom DTD resolve them anyway? The ramification is that w3c comes along in 2, 5, 10 years and creates an attribute with the same name. Now your page is broken. HTML5 is going to provide a data attribute type for legal custom attributes (like data-myattr="foo"