In one of my previous articles, Using Heading Elements to Create a Document Outline, I explained the importance of having valid outlines in an HTML page.
The outline for an HTML document shows the structure of the content on the page. This is useful for user agents, who can use the outline to create, for example, a table of contents for the document. This can then be used by screen readers to help people better navigate the page.
Last week, HTML 5.1 was officially released. There were a number of interesting changes made, two of which relate to how we create a valid document outline.
- Removed: The use of nested
<section>elements each with an
<h1>to create an outline
<footer>elements can be nested, if each level is within a sectioning element
Creating Document Outlines with Nested
In HTML 5.0, a new way of creating a document outline was introduced. It involved using only the
<h1>heading rank, and instead nesting
<section>elements to define nested sections within the document.