CSS id or class?

M

mark | r

am i correct in that ID can only be used for one element and that class is
to be used for multiple elements needing a collective style?

i am confused!

mark
 
L

Lauri Raittila

In said:
am i correct in that ID can only be used for one element

Yes. Other thing is that if you have id, you can link directly to the
element.
and that class is
to be used for multiple elements needing a collective style?

Yes, but of course you can use it for just one element too.
 
D

Disco Octopus

in mark | r typed:
am i correct in that ID can only be used for one element
yes.


and that
class is to be used for multiple elements needing a collective style?

yes.


i am confused!

you underestimate yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top