How the <div> works? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How the <div> works?

We have to add <div> in <body>. But why? https://code.sololearn.com/W6sFlas52uSw/?ref=app

13th Apr 2018, 7:27 AM
Rahil Mavani
Rahil Mavani - avatar
2 Answers
+ 6
the div is a block level element,a container
13th Apr 2018, 7:30 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 3
Just think of the DIV element as a styleble contractor for grouping other elements.
13th Apr 2018, 9:17 AM
josh mizzi
josh mizzi - avatar