Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

divs or sections?

I noticed that some web designers use the element section instead of div. so when to use one rather than the other?

2 Answers

A quick Google directs me to this article ... Section vs Div - HTML5 and Semantics.

HTML5 doctor says ... Don’t use section as a wrapper for styling

Also for context, here's an article on learning to use the HTML5 semantic elements including section.)

You can also check this chart

larger version

Hopefully this will help you. http://html5doctor.com/the-section-element/

Generally I have my section(s), and than have my divs for structure inside.