Home › Forums › CSS › CSS Class and Id › Reply To: CSS Class and Id
April 9, 2016 at 1:11 am
#240331
Atelierbram
Participant
Reasons why it is common practice now to use mainly classes in CSS is the extremely high specificity of ID’s, which makes it harder to override declarations set before. ID’s are also unique, and classes are not, so this makes classes more versatile, also because there can be multiple classes on one element in HTML.
ID’s can be convenient for targeting elements in javaScript, and as targets for anchor-links.