What is the difference in id and class selectors?(by example)
CSS rules by class can be implemented on many items, while the Id is unique, it can only be implemented on one and only item in the document, you can't have more than one element having the same Id on a document. Your code already explained the concept, one element with unique Id and multiple elements with same class. Hth, cmiiw
@lpang still didn't understood! what is the meaning of id implemented only on one and only. but i used it two places so still didn't understanding answered of difference!
@lpang cool😊 ill try not to be naughty hehehe just kidding
keep a note of this. Id selectors in CSS begins with a # (followed by the name). Whereas, class selectors begin with a .(followed by the name).