May 10, 2013

What is difference between Class and ID in CSS

Leave a Comment
Difference between Class and id Selectors?

ID can be use only one time on each element, Each page can have only one element with that ID. Classes can be use on multiple elements, You can use multiple classes on the same element.

The # means that it matches the id of an element. The . signifies the class name, for example:

#myRedText {color: red;}
.blueText {color: blue;}

0 comments:

Post a Comment