DEV Community

Joel Diharce
Joel Diharce

Posted on

Classes and IDs? Feels like school again. Wait a minute...

I'm listening to this lesson, and paused it after it finished the third sentence immediately - from what I know about javascript, this topic sounds awfully similar to objects/instances. So if you know some javascript, this may sound familiar.


I was wrong!! Haha... heh...

Classes and IDs are used to identify an element in html. Classes can identify multiple, and IDs can identify just one. I know: "What is that useful for?" I thought the same thing. Apparently, you can use them in CSS to be able to select elements individually, or in groups, in order to apply some styles to them.

No examples on this yet, but we will go over it more when we learn about CSS. :) Exciiitiiiing!

Top comments (0)