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

What is the use of <div

8

19th Aug 2017, 3:53 PM
Omar Mmdoh
Omar Mmdoh - avatar
9 Answers
+ 7
divide the document into two section..we use div elements to group together html elements and apply CSS styles to many elements at once.
19th Aug 2017, 8:18 PM
Gregor Duff
Gregor Duff - avatar
+ 6
A block-level container In other words, can contain paragraphes, tables, images, texts, videos, other divs, etc
19th Aug 2017, 3:57 PM
MIZO PRO (ハムザ)
MIZO PRO (ハムザ) - avatar
+ 2
let's say you wanted the left side of the page to be pictures and the right words, you would use two div tags. one for pictures, one for tags then head into css to align them properly
19th Aug 2017, 4:00 PM
Jordan Chapman
Jordan Chapman - avatar
+ 1
it's just to DIVide things into DIVisions. I probably over use the tag alot when writing larger websites
19th Aug 2017, 3:55 PM
Jordan Chapman
Jordan Chapman - avatar
+ 1
Pretend for a moment: you have a webpage, and you would like to create a section at the top that has various icons and links, with a different color to distinguish it from the rest of the page. A div would be perfect for this, because you can use it to contain all of these icons and links, and use CSS styling elements to change the background color.
19th Aug 2017, 4:02 PM
theupandup
theupandup - avatar
+ 1
it is simply a grouping element. you can group one or more elements within it.
21st Aug 2017, 8:24 AM
Muhammad Ahsan Habib
Muhammad Ahsan Habib - avatar
0
is use in html for tagging
19th Aug 2017, 3:56 PM
Sarifudin Z
Sarifudin Z - avatar
0
thanks alot
19th Aug 2017, 4:04 PM
Omar Mmdoh
Omar Mmdoh - avatar
- 1
I still misunderstand
19th Aug 2017, 3:58 PM
Omar Mmdoh
Omar Mmdoh - avatar