+ 1
What is <div> tag used for and what is <div class="section"> attribute used for?
2 Antworten
+ 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
0
Also edit your question as there is no dog tag in html