+ 3
What is the use of <div>tag in html
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
+ 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
+ 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!
0
the div don't do anything, it is used for use css styles and same