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.

HTML HTML Basics Images, Text and Links Captioning Images

What is sectioning root and outline? What is the difference between them?

Several times read MDN article but I didn't get it. I imagine it like sectioning root is the main outline of the web page but then it goes deeper into code and there is another outline nested inside the sectioning root. But then <footer> is the sectioning root but <blockquote> is also sectioning root. No logic, <blockquote>can be deep inside. I want to see the structure.

2 Answers

It's in MDN here. I just dived deeped and sunk.

Citation from MDN:

"Sectioning roots

A sectioning root is an HTML element that can have its own outline, but the sections and headings inside it does not contribute to the outline of its ancestor. Beside <body> which is the logical sectioning root of a document, these are often elements that introduce external content to the page: <blockquote>, <details>, <fieldset>, <figure> and <td>."

Steven Parker
Steven Parker
217,533 Points

Before you get too involved with outline algorithm, take another look at the warning on that same page:

Important: There are currently no known implementations of the outline algorithm in graphical browsers or assistive technology user agents, although the algorithm is implemented in other software such as conformance checkers. Therefore the outline algorithm cannot be relied upon to convey document structure to users.

Personally, I avoid any web technology until it is already implemented in the vast majority of browsers.

Steven Parker
Steven Parker
217,533 Points

It doesn't seem like the phrase "sectioning root" ever appears in the video. If I'm missing something, could you provide the time index were this occurs?

The video does talk about the "project root", that's referring to the top-level folder on the disk where all files and other folders are stored. This is not related to the organization of tags in the HTML file.