+ 1

what's the purpose of the tag div? and what's the difference between classes and id ?

yesterday I began to learn css and I didn't understand this can someone please explain?

30th Jul 2016, 7:27 AM
Kayleigh
Kayleigh - avatar
1 Answer
+ 5
div tag is used to create division or section in html document. Generally it is used to group elements and format them with CSS. classes can be used to apply style to many elements. Whereas id can be used for a particular element only.id is unique to only one element
30th Jul 2016, 10:53 AM
Yagyik Pant
Yagyik Pant - avatar