Table of Contents
A semantic contents wrapper for native navigation and lists, with authored page-number presentation in P0 and explicit separation from automatic target-page counters.
Capability note. Automatic page-number lookup from links is not a portable browser capability. Do not calculate TOC pages from DOM height.
Authored page numbers
Use ordinary navigation semantics with explicit page values when known.
On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.
View HTML
<ef-print-toc>
<nav aria-label='Contents'><ol>
<li><a href='#summary'>Executive summary</a><span data-page>2</span></li>
<li><a href='#evidence'>Evidence</a><span data-page>7</span></li>
</ol></nav>
</ef-print-toc>
<section id='summary'><h2>Executive summary</h2><p>The summary states the decision and its evidence boundary.</p></section>
<section id='evidence'><h2>Evidence</h2><p>Evidence records support each finding.</p></section>
Contents without page values
A TOC remains useful as semantic navigation even when automatic target counters are unavailable.
On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.
View HTML
<ef-print-toc>
<nav aria-label='Contents'><ol>
<li><a href='#context'>Context</a></li>
<li><a href='#decision'>Decision</a></li>
</ol></nav>
</ef-print-toc>
<section id='context'><h2>Context</h2><p>The context section frames the question.</p></section>
<section id='decision'><h2>Decision</h2><p>The decision section records the chosen option.</p></section>
Nested contents
Applications may retain normal nested-list hierarchy for subsection structure.
On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.
View HTML
<ef-print-toc>
<nav aria-label='Contents'><ol>
<li><a href='#one'>1. Architecture</a><span data-page>3</span></li>
<li><a href='#two'>2. Evidence</a><span data-page>9</span></li>
</ol></nav>
</ef-print-toc>
<section id='one'><h2>1. Architecture</h2><p>Architecture describes the document structure.</p></section>
<section id='two'><h2>2. Evidence</h2><p>Evidence lists the observations.</p></section>