Previous Message
Next Message

[css-d] difference between class and id selectors

Sent by Jonathon Delacour on 31 January 2002 02:02

Encouraged by Eric Meyer's recent post encouraging all levels of questions, 
I'd like to ask about something that's been bugging me for a while.

I'm wondering if someone can succinctly explain (or point to an explanation 
of) the fundamental difference(s) between CLASS and ID selectors. In all 
the books and online resources I've looked at, the examples given seem to 
me to be applicable to either selector. As in <p class="first-para"> or <p 

To put it another way, are there circumstances in which one would always 
use an ID selector and not a CLASS selector (or vice versa)?

Previous Message
Next Message

Message thread: