+ 4
What's the difference between id and class?
Seriously i don't see a difference for some situation(s).
4 Answers
+ 3
id must be used by one object tag.
class defines style for several objects tags.
if you declare several p tag with the same style, use class option.
otherwise, you must create an id option by p tag
+ 3
Explaining this ideology to the lowest term, the names "class" and "id" given in HTML in real life means...
Class can be defined as a group of elements just like having different students in a class room.
Id can be defined as an identity given to every element in the class - "Every students having their own identity in a class room. Your teacher identifies you by your ID information".
+ 2
class is common, id is unique. you can't use unique id on the page twice, but you can use a class as many times as you want to.