+ 1

<div></div>

Please can someone help me to explain what the code does, (<div></div>) I still don't get it

18th Sep 2024, 10:16 PM
Utibe David Amos
Utibe  David Amos - avatar
4 Respostas
+ 4
A DIV tag is basically just an empty block. You can assign properties to it so that it has borders, padding, margins, colors, etc. But on it's own, it's just an empty container with no default properties. Give it a size and color, and it will be a box on the screen. Put other elements inside it, etc.
18th Sep 2024, 11:07 PM
Jerry Hobby
Jerry Hobby - avatar
+ 3
In addition to above answer it is used as container.
19th Sep 2024, 5:22 AM
Andrew [DEAD]
Andrew [DEAD] - avatar
0
It is just a tag it can include some tags too like: <div> <h1>hellp world</h1> </div> Sometimes we use it to separate different part of sites
20th Sep 2024, 2:16 PM
Fateme Biglari
Fateme Biglari - avatar
0
It's a container
20th Sep 2024, 4:49 PM
Rayane Nour