ID’s Cannot Start With a Number
Published by Chris Coyier
Tempted to use something like "1800number_box" for a ID? Don't. Because it won't work. Class identifiers are allowed to start with a number, but ID identifiers are not.
That is all.
BUT
If you have already existing code using it that way that you absolutely can't change, you can access it with:
[id='1800number_box'] {
/* does work */
}
#1800number_box {
/* doesn't work */
}
I just spent 1 hour figuring why #1Col #content wasn’t working…
Thanks for the tip!
well is there any scientific reason behind this or its just a rull as you said “That is all.” please let me know if you have a link to this
regards
Surja
Any idea if they can start with an underscore? validator.w3.org isn’t throwing any errors, but I’m still not 100% sure.