HTML & CSS
can an item have both an id AND a class?? or does one trump the other? any help for a massage therapist playing in the IT dept. would be appreciated!
Yes, it can. For styling purposes, the
id attribute is more specific than the
class attribute, and if there's a conflict between the
class styling, the
id style will be used.
Also note that an item can have lots of classes, but only one ID.
This topic is now closed. New replies are no longer allowed.