Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
29,712 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.