+ 1
What is the difference between ID and class?
if possible tell me in which condition these tag are used.
5 Respostas
+ 5
id: Its used for set to an element an identification unique in entire HTML tree. Can exist ONLY one element with same id and any element can has at max ONE id
class: Its used for describe an set of element that share common properties. Any class can be associated to MULTIPLE elements and any element can belong to MULTIPLE class
+ 2
Mean that cannot exists different elements with same id and any element can has max one id
+ 2
got it. many many thanks 😊😊
+ 2
👍👍😁
+ 1
it means we can use id multiple times but only to specific element.