Which elements of an XHTML/HTML5 page should be explicitly included in the document outline?
The HTML5 spec definition of the "section" element is:
The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a heading.
...
Note: The section element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead. A general rule is that the section element is appropriate only if the element's contents would be liste开发者_开发百科d explicitly in the document's outline.
What content should be explicitly listed in the outline? I don't know exactly when or how the outline is used, so it's difficult for me to guess.
Should page navigation be included in the outline? Tangentially-related content (like asides)? Or just the main content of a page?
Like a lot of markup - there's a degree of personal preference involved. Since an outline is most often used to create a Table of Contents, that's the easiest way to measure what should be included in a outline. Compare with a Word document. Would you expect to see the header of an aside in the table of contents? Sometimes yes, sometimes no. Only you can judge whether it's appropriate for your page.
精彩评论