[thelist] Custom HTML Attributes and W3C

James Aylard evolt at pixelwright.com
Mon May 10 13:59:31 CDT 2004


hersho robinzon wrote:

> If you need to associate custom data with an HTML element but you do
> not want to use a custom attribute which would forego HTML validity,
> one option is to find a valid attribute that you do not use and that
> you expect/hope never to use. There are some slightly odd or rarely
> used ones out there, such as onmousemove and lang (lang is not
> generally relevant for elements aside from <body>, especially for a
> single-language document.)
[...]
> One caveat is that this 'trick' is certainly just that, a trick and
> it is potentially prone to causing problems in the future, should
> that attribute one day become relevant.

    All of which raises the question: what is the value of
"standards-compliance" if one resorts to techniques that clearly undermine
the intent of such standards while perhaps maintaining a paper-thin
technical validity? You're really only just tip-toeing past the limitations
of the validator.

James Aylard



More information about the thelist mailing list