0
Classes are always set in the CSS after a dot (.):
.myclass {}
IDs are always set in CSS after a hashtag (#):
#myid {}
They work like "hooks" for other languages like CSS and JavaScript.
When you try to take something on a page with JavaScript you will need the element ID or class in order to perform something.
IDs are unique, classes aren't.
Each element can have only one ID, also, each page can have only one element with the same ID(this is not a rule, since you know what you're doing).
Classes are not unique, you can use the same class on various elements.
A class do not have a special function on browsers, while IDs have.
Any element can carry both ID and class.
In CSS you can do the same thing with ID and class, it doesn't care.



