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
Giuseppe Nardella
17,790 PointsSection Elements and Sectioning Contents
Hi,
can someone explain to me what is the difference between "Section Elements" and "Sectioning Contents"?
In W3C HTML5 specifications i found:
-
Sectioning Contents: article, section, nav and aside elements;
- Section Elements: body, article, section, nav, aside, headings(h1-h6), header, footer and address.
Thanks
1 Answer
Steve McKinney
29,274 PointsEveryone can make a different opinion of those elements, but one way to think of it is as a table of contents. An article can be made up of many sections. Sections can be made up of many articles, each section can have its own header and footer. You can go deep into this but most times its not necessary.
Here's some helpful links that explain it far better than I have http://html5doctor.com/avoiding-common-html5-mistakes/ http://html5doctor.com/outlines/
The html5doctor flow chart can be helpful. http://html5doctor.com/downloads/h5d-sectioning-flowchart.pdf
Yonatan Schultz
12,045 PointsYonatan Schultz
12,045 PointsAs I understand it 'Sectioning Contents' are there for you to define sections you would like to have in your document. For instance, you can define styling for an 'article' element if you want to apply css to every article you post.
So the above is the process of breaking your content into sections which can have specific CSS applied to them.
Section elements are then the specific elements that you will address in your CSS. For example, article ul will address the unordered list elements within the article element.