On Friday, 27 April 2012 10:47:51 UTC+1, DaveK wrote:
>
> > <input type='checkbox' id='1' 
>
> not a legal ID - must start with a letter 


That's no longer true as of HTML5, which in this case is just documenting 
what browsers already did:
http://www.w3.org/TR/html5/elements.html#the-id-attribute

It *was* true for HTML4, but browsers didn't care in terms of 
document.getElementById and such.

Note that it's still true for CSS (#1 is an invalid selector), and browsers 
*do* care about that (e.g., with querySelectorAll and such):
http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

So while HTML5 is very lax, if you're ever going to use CSS selectors to 
refer to the element, best to stick to the more restrictive CSS rules.

FWIW,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/waBN43eCc84J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to