12. ID, please! Question about difference between class and ID


#1


https://www.codecademy.com/courses/web-beginner-en-WF0CF/2/3?curriculum_id=50579fb998b470000202dc8b


Classes and ID's both seem to be more or less the same to me. It says ID's are for only singular or whatever elements while classes are for many. Yet it asks me to implement in this lesson and the lesson before it both of these features in the same way, which to me means there's no real difference. Can someone explain this to me? Maybe a bit better than these lessons did?


#2

You want to understand the differences between ids and classes or use cases when one is more suitable than the other?


#3

This question has definitely already been asked on the forum, please search a bit before you ask :slight_smile:


#4

browser these days unfortunate support using the same id name multiply times, but they are still different (especially when using javascript and jquery), also if a html element has an id and class, the id will be applied because it is more powerful


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.