+ 3

What is the use of <div>tag in html

29th Apr 2018, 2:07 PM
JATIN $HARMA
JATIN $HARMA - avatar
4 Answers
+ 7
It is used as a container for other elements. They make it easier to group different sections together when it comes to styling with CSS
29th Apr 2018, 2:14 PM
Memphis Reigns
Memphis Reigns - avatar
+ 1
it sorts things basically. like memphis said it is a container which means it sorts things. say you want a story part and a calendar section pn a code you can put both of them in seperate divs and give the divs an id so it's easy to find and edit with css/js
29th Apr 2018, 7:03 PM
Emperor Bob
Emperor Bob - avatar
+ 1
The <div> tags don't do anything in specific. What you can do however, which is very handy when it comes to styling, is give each of your <div> tags a different id so that each section of your code has a clear separate id which you can then use to style different elements of your page. You can even put <div> tags within one another so that you can split up your code even more. They aren't necessary, just very handy!
30th Apr 2018, 3:38 PM
Jade Emily
0
the div don't do anything, it is used for use css styles and same
29th Apr 2018, 2:10 PM
Dilshodjon Olimov
Dilshodjon Olimov - avatar