+ 1

Does the <div> tag of Html work the same function as <section> ?

Could there be some differences? If so,could someone explain this for me.

27th Jul 2021, 1:31 PM
Emmanuel Felix Ocaya
Emmanuel Felix Ocaya - avatar
3 Réponses
+ 3
27th Jul 2021, 1:32 PM
Brain & Bones
Brain & Bones - avatar
+ 3
The <div> tag defines a division or a section in an HTML document. Section tag defines the section of documents such as chapters, headers, footers or any other sections. The section tag divides the content into sections and subsections. The section tag is used when requirements of two headers or footers or any other section of documents are needed. Section tag grouped the generic block of related contents. The main advantage of the section tag is, it is a semantic element, which describes its meaning to both browser and developer.
27th Jul 2021, 2:17 PM
Abhishek Kumar
Abhishek Kumar - avatar
+ 2
Div used since long ago as container tag. In html5 some simantic tag has been introduce for better code understanding section,header,footer,main,aside are some examples of semantic tags. They both are block level element and used as container tag.
27th Jul 2021, 1:46 PM
Divya Mohan
Divya Mohan - avatar