What does <div> do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does <div> do?

9th Aug 2015, 4:00 AM
Kyla Elefan
Kyla Elefan - avatar
4 Answers
0
explain more
4th Jun 2016, 5:18 PM
techa
techa - avatar
- 1
It is used as a container for other elements. For example if you want to write two identical stories using tags such as <h1> for the headline, <p> for the text and <img> to include images, you have to put each story in a <div>. Imagine the <div> as a box which contain any element you want.
14th Aug 2015, 7:48 PM
Боян Наков
Боян Наков - avatar
- 1
div tag divide page in division. it is a block level element
4th Sep 2015, 5:03 PM
gajendra singh
gajendra singh - avatar