1. Computing

Discuss in my forum

How to Choose ID and Class Names

By , About.com Guide

CSS does not allow class and id names to start with a number or other non-alphabetical character. The only exception to this is if you use an escape character - which many browsers don't support.

You should always start your class and id names with a alphabetic character (not a number or a non-alpha character).

Also, keep in mind that while XHTML is case-sensitive, you cannot have two ids in the same document that are different only in case. For example:

#TextColor { color : #000; }
#textcolor { color : #f00; }

Would not be valid in the same document.

©2013 About.com. All rights reserved.