[thelist] what characters are allowed in class="..."?

Zhang Weiwu zhangweiwu at realss.com
Thu Dec 27 04:05:53 CST 2007


Hassan Schroeder wrote:
> On Dec 24, 2007 5:06 AM, Zhang Weiwu <zhangweiwu at realss.com> wrote:
>
>   
>> I read the spec and understood it in a way that all characters except
>> carrier-return and spaces are allowed to be used as class name:
>> http://www.w3.org/TR/html4/struct/global.html#h-7.5.2
>>     
>
> How you get "all characters" out of this:
> <quote>
> 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 (".").
> </quote>
> :: I'm not sure, but yes, hyphens are OK.
>   
You are looking at the wrong section, the type for class name is CDATA
but not ID/NAME. Just as an example: I can say class="a b" but I cannot
say id="a b".



More information about the thelist mailing list