Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Hi Vaneet, The difference between an ID and a class is that an ID can be used to identify one element, but a class can be used to identify more than one. when you give an element class=“item” for example you can give it to more than one element, you can have 2 or more classes with class “item” but when you use an ID for example id=“comment 200” you can give it to just one element and for other elements you should use another ID. I hope you understand it now
11th Dec 2019, 12:47 AM
Mohaimen Al-Janabi
Mohaimen Al-Janabi - avatar
+ 1
So hard
30th Mar 2020, 9:49 PM
Salamatu Adnan
Salamatu Adnan - avatar
0
Hi ID ---> The title of your page CLASS--> another element you want to style.
3rd Jan 2020, 8:07 PM
paplaye NDOUR
paplaye NDOUR - avatar