+ 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.
3 Respuestas
+ 3
Please try searching it yourself next time.
Happy coding. 😉
https://www.w3docs.com/snippets/html/what-is-the-difference-between-section-and-div-elements.html
+ 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.
+ 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.