What is the key difference between ID selector and CLASS selector?
id="myid1 myid2 " is wrong ××××× class="cls1 cls2 cls2" possible √√√
An id should be used once and classes can be used as many time as you need .
ID selector can only be used once in an HTML document while CLASS selector can be assigned to more than one elements in an HTML document. You can assign more than one class to an element but you can only assigned one ID to an element. ID selector is defined in CSS with the # sign example #ID while CLASS selector is defined in CSS with the period (.) sign example .CLASS I hope this explains it