Underscores in CSS identifiers

Do not use underscores in CSS identifiers.

The W3C CSS 2.1 Specification states that identifiers are allowed to contain underscores. However, the CSS 1 spec and the first draft of the CSS 2 spec made no mention of them, so some older browsers, written when those specs had not been updated, don't support the use of the underscore.

You can get further information on this by doing a web search for 'css underscores indentifiers' or similar. Here's the first hit I got from Google, on which I base the above info: [thelist] validating css.

Last modified: 06/05/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top