I have been told that dashes are illegal in some scripts, but not css2 as far as I know.
Re selectors, I found this regarding CSS1 which says underscores are illegal:-
http://lists.evolt.org/archive/Week-...11/106623.html
Re CSS2 selectors see this:-
http://www.nic.fi/~tapio1//Teaching/Valitsimet1.php3
You can use also number + hyphen, but you can't start with them.
The name must start with a normal letter (a-z,A-Z). Accepting the underscore (_) has been afterward added into CSS2.
See also the official CSS2 changes:-
http://www.w3.org/TR/CSS21/changes.html
The underscore character ("_") is allowed in identifiers.
Note the different way browsers render it:-
http://www.thefixor.com/help/cssfaq.php
-------------------------
I believe underscores are still valid in urls but undesirable as many links have an underline which obscures the underscore. There have been situations where someone writes down or reads out a url to a colleague assuming a space which is really an underscore and the url when later used is no good.
Both should be avoided in my view.
I found this interesting, (it didn't say either is invalid):-
http://www.simoncox.com/mt3/2006/06/...nderscores.php
Last edited by Wickham; 09 Aug 2006 at 10:53 AM.
Code downloaded to my PC will be deleted in due course.
WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.