I was reading here about the element <section>
. I have read the specification, read some articles on, and still can not understand what benefit this element brings is no longer covered by the <div>
element.
I saw the example in the specification itself and found it somewhat contradictory. W3C shows an example in which the summary of a book is divided into sections, and the sections are formatted with CSS. But at the very beginning of the specification there is a recommendation that this should not be done:
The
section
element is not a generic container element. When an element is needed only for stylization purposes or for script convenience, authors are encouraged to use thediv
element.
So, when and why do you use <section>
instead of <div>
?