What is <div and when to use it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is <div and when to use it?

13th Oct 2017, 12:39 PM
Ayman Khan
Ayman Khan - avatar
3 Answers
+ 2
div is short for division. it helps group your contents into various sections. Before HTML 5 div was used in the place of header, nav, footer, section, article and more. It is just a container like the body tag and you can insert any HTML tag inside it. div is useful with CSS but with HTML it play very little role except for the break it creates after the end tag which is why it is called a block element instead of inline.
13th Oct 2017, 4:33 PM
Core i9
Core i9 - avatar
+ 2
Its like a block or layer. You can use it to manage better others tags for positionate
13th Oct 2017, 12:57 PM
Daniel
Daniel - avatar