[thelist] Rules for valid css class names

Hassan Schroeder hassan at webtuitive.com
Thu Mar 10 13:34:59 CST 2005


Dave Merrill wrote:
> Can anyone point me to the rules for what constitutes a legal css class
> name? The Class Selectors section of the w3 css21 spec doesn't say.

Because ID is an (X)HTML attribute -- definition is at:
  <http://www.w3.org/TR/html4/types.html#type-name>

    ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
    followed by any number of letters, digits ([0-9]), hyphens ("-"),
    underscores ("_"), colons (":"), and periods (".").

HTH,
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list