I am getting one validation error due to my use of data-href=\"\" in the context of making a whole DIV clickable. The JS and HTML is below. What could I do to make this W3C
data- attributes are part of the HTML5 specification so if your document does not have the HTML5 Doctype, the validator will produce an error.
In the meantime, there is no problem of using those attribute with an HTML4 doctype, the browser will do nothing with it and you'll be able to work with them - the page will simply not validate to the W3C validator.