DEV Community

loading...

Discussion on: Stop using so many divs! An intro to semantic HTML

Collapse
ofek3103 profile image
ofek3103

<div class=container> The element is a white rectangle centered in the middle of the page.

Thread Thread
kenbellows profile image
Ken Bellows Author

So, the semantic elements introduced in HTML5 are all about conveying the structure of the data. Purely stylistic elements, like containers that only exist to help make the CSS work the way you want, don't have any semantics to represent, so a plain
old <div> really is the correct choice there, no replacement necessary.