CSS CSS Layout Basics Getting Started with CSS Layout Centering Page Content and Creating a Full-width Header

Why not use section instead?

I don't understand why you wouldn't just use section tags?

2 Answers

Austin Whipple
Austin Whipple
27,491 Points

Possibly a couple reasons:

  1. The first and most relevant is that, according to specifications, the <section> tag should be used only when grouping related content, usually associated with a heading. Not simply for convenience when scripting or styling. When that's what you're after, it's better to use the good ol' <div> tag. This StackOverflow article is very handy.

  2. <section> is only supported in IE9 and up, so depending on production time of the video, perhaps it was better to use <div> rather than show <section> and explain the caveats.

OK, thank you very much.