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


michael Angel
michael Angel
1,213 Points

Nesting Article and Section tags...

I'm a little confused where in the video you shown, the article is nested inside the section tag, while in the MDN, the section tag is nested inside the article tag. Which should we use?

1 Answer

Steven Parker
Steven Parker
229,644 Points

The "section" tag is a generic semantic container, so there aren't many rules about how and where it can be used. The guidelines in MDN include:

  • use it for a standalone section which doesn't have a more specific semantic element to represent it
  • a <section> should be identified, typically by a heading as a child element
  • it should not be used as a purely generic container, such as for styling; this is what <div> is for
  • a section should logically appear in the outline of a document
  • it must not be a descendant of an <address> element.