+ 1

What is <div> tag used for and what is <div class="section"> attribute used for?

30th Apr 2018, 12:00 PM
Rohan Shah
Rohan Shah - avatar
2 ответов
+ 1
div tag is like container in html, which can wrap html elements in it. It is used to group one or more elements together and apply them css. like if ur using div tag to wrap 2-3 p tags together u don't have to style them separately if u specify style in that div tag generally html contains lots of elements so to identify an specific element class attribute is used so we can specifically style it using css u can also use id attribute and style using it both of them can also used to work with javascript
30th Apr 2018, 12:22 PM
Yugabdh
Yugabdh - avatar
0
Also edit your question as there is no dog tag in html
30th Apr 2018, 12:23 PM
Yugabdh
Yugabdh - avatar