why use id's & class's in html why not just one?

后端 未结 4 385
春和景丽
春和景丽 2020-12-22 11:17

i understand what there is a difference between id\'s and class\'s - ids and ment to be given to a unique item, and class\'s and like tags, they can be given to multiple ite

4条回答
  •  有刺的猬
    2020-12-22 12:12

    Adding to Sam's answer. Ids are helpful both for styling and javascript. If you want only a particular style applied or want to increase the specificity of your css id come handy.

提交回复
热议问题