The difference between ID and Class on CSS

This site must be a good reference.
http://css-tricks.com/the-difference-between-id-and-class/

If it is explained very simply;
Classes are not unique,
IDs are unique.

You can use both at the same time. In that case, ID takes precedence.
It is very natural if you think logically, because ID is just for one.

Comments

Popular Posts