css의 id와 class의 차이

web 2018. 1. 8. 14:29

* ID's are unique

Each element can have only one ID

Each page can have only one element with that ID

* Classes are NOT unique

You can use the same class on multiple elements.

You can use multiple classes on the same element.

The “id=something” can be used to style one HTML element, whereas the “class=something” could be used to style multiple elements.


Posted by '김용환'

댓글을 달아 주세요