CSS, How to, should you use ID or Class?
Wednesday, 5. August 2009
Should you use id or class? Classes can be used as many times as needed within a document. IDs can only be applied once within a document. If you need to use the same selector more then once, classes are a better choice.
However, IDs have more weight then classes. If a class selector and ID selector apply the same property to one element, the ID selector’s value would be chosen.
