IDs vs. Classes

 > Also, the spec explicitly states that a simple selector can have only
 > 1 class (in section 1.4), but I could find no such limit on the number of
 > IDs per simple selector.
 > 
 > Is that a purposeful omission (and simple selectors can have multiple
 > IDs) or does the same limit apply to IDs (only 1 per simple selector)?

The specific limitation for class values is there since the Cougar DTD
[1] suggests that the CLASS attribute value is a comma-separeated list
of values. CSS1 does not support this, and that's why we needed a
specific limitation. We're still debating if having more than one
class value makes sense. Feedback welcome.

For ID, noone have suggested it being more that an single value --
indeed, such a suggestion would defeat the purpose of ID. A
selector with more than one ID value would never select anything.

[1] http://www.w3.org/pub/WWW/MarkUp/Cougar/HTML.dtd

Regards,

-h&kon

H   å   k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria §°þ#¡ª FRANCE http://www.w3.org/people/howcome

Received on Tuesday, 8 October 1996 05:26:54 UTC