HTML HTML Basics Structuring Your Content Structuring Your Content Review

gene c
gene c
13,630 Points

what is the difference between <section> and <div>?

I understand that both <section> tags and <div> tags are used to contain blocks of content that are related to each other but how do we determine which tag is more appropriate to use?

1 Answer

Luc de Brouwer
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,938 Points

<section> means that the content inside is grouped (i.e. relates to a single theme), and should appear as an entry in an outline of the page.

<div>, on the other hand, does not convey any meaning, aside from any found in its class, lang and title attributes.