HTML and CSS Reference
The <header> element can contain any content, but the <hgroup> element
can only contain other headers—that is, <h1> to <h6> , plus <hgroup>
itself. The following diagram demonstrates the differences.
The outlining algorithm generates a table of contents for your docu-
ment based on the section and heading markup you've used. In
HTML4 , the overall structure of a document was left up to individual
browsers to decide; in HTML5 , it's part of the spec. This benefits you
because any user agents that need an outline, often for accessibility
purposes, 2 will generate the same outline for any given document. To
help you get the idea, let's look at several sample documents. Erwin
will generate the document outline according to the HTML5 spec.
You'll see how the outline is impacted both by headings and heading
groups as well as the articles and sections we discussed in the previous
The W3C's User Agent Accessibility Guidelines recommend that browsers generate a document out-
line in guideline 1.10.2: www.w3.org/TR/UAAG20/#gl-alternative-views .