In principle, you can retrieve a value of any attribute using
getAttribute
function:
http://www.w3schools.com/jsref/met_element_getattribute.asp[
^].
I would say this practice is questionable. I would not recommend it. Even though it should practically work, such HTML usage cannot be standard. If you process HTML as XHTML (which is very reasonable, because it helps to eliminate non-well-formed constructs and perform tighter testing in general), your HTML will fail. This is explainable. What if the future HTML standard introduces some new attributes with the same name as yours? Where will you be in this case?
—SA