5. Example Headings
Text that introduces this page.
5.1. Heading Level 2
Text under heading level 2.
5.1.1. Heading Level 3
Text under heading level 3.
5.1.1.1. Heading Level 4
Text under heading level 4.
5.1.1.1.1. Heading Level 5
Text under heading level 5.
5.1.1.1.1.1. Heading Level 6
Text under heading level 6.
5.1.1.1.1.1.1. Heading Level 7
Text under heading level 7.
Below level 6, the Docutils parser’s HTML output generator compensates for the
lack of an <h7> HTML tag by adding an “aria-level” attribute to the <h6>
tag like this:
<h6 aria-level="7"> . . . </h6>
<h6 aria-level="8"> . . . </h6>
<h6 aria-level="9"> . . . </h6>
and so on for levels beyond. This is a clever strategy used by Docutils that both removes the 6-level limitation as well as enabling authors to target those types of headings using special CSS selectors. Example:
h6[aria-level="7"] { font-size: small; }
h6[aria-level="8"] { font-size: small; text-decoration: underline; }
h6[aria-level="9"] { font-size: small; text-decoration: underline dotted; }
/* etc. */
While this is not very useful, it is illustrative and so is included to plant idea seeds to help you think about what you might want to do with it.
5.1.1.1.1.1.1.1. Heading Level 8
Text under heading level 8.
5.1.1.1.1.1.1.1.1. Heading Level 9
Text under heading level 9.