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

Zhang Weiwu zhangweiwu at realss.com
Mon Dec 24 07:06:32 CST 2007

Dear all

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:

We have been using class name like this for long time, valid for all
<a class="anchor-area-for-navigation-bar-item-container">...</a>

However vim often highlight it wrongly, e.g.
.anchor-area-for-navigation-bar-item-container {
    font-weight: bold;

in the above vim would highlight "area" differently than other words
(e.g. anchor).

Is this a mistake of vim CSS highlight or should I not use dash in class

gedit seems also think dash in css class name would be wrong, for example:
.normal-question { border: thin outset maroon;}
the word normal is also highlighted and look different than "questoin"
in gedit. If it is ".normal_question" then the word normal would not be

P. S. css validator in w3.org do not complain about these class names
with dashes in it.

Best regards
Zhang Weiwu

Real Softservice

Huateng Tower, Unit 1788
Jia 302 3rd area of Jinsong, Chao Yang

Tel: +86 (10) 8773 0650 ext 603
Mobile: 135 9950 2413

More information about the thelist mailing list