+ 1
What is difference between id and class?
4 Answers
+ 2
https://css-tricks.com/the-difference-between-id-and-class/?_e_pi_=7%2CPAGE_ID10%2C6602713746
+ 2
id and class is related for CSS and JavaScript.
in my opinion "id" means identity, it is unique. So if you have give id to one html element then you can't name other element with same id with the first one.
Meanwhile class is different, "class" is like classification, or you can imagine it like classroom. In classroom there are students (in this case html elements), more than one students is inside same class. calling one class will call all the students (html element) inside.
Hope answered your question.
+ 1
this also helped me.... thanks