Running content

Page Number

An explicit page-counter intent marker that never estimates pagination from DOM height and keeps authored fallback text available.

Elementef-print-page-number
CapabilityP1/P2 counter · P0 authored fallback
Maturityimplemented / capability-bound
Pagination ownerBrowser / selected renderer

Capability note. Dynamic current/total counters require renderer support. Folio core does not guess page numbers in JavaScript.

Example 1

Page counter intent

Use format='page' when a supporting renderer should emit the current page.

Open standalone print preview

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-footer>
  <span slot='right'><ef-print-page-number format='page'>Page number supplied by renderer</ef-print-page-number></span>
</ef-print-footer>
Example 2

Page of pages intent

The physical Page X of Y value is a P1/P2 renderer capability.

Open standalone print preview

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-footer repeat='page'>
  <span slot='right'><ef-print-page-number format='page-of-pages'>Page X of Y</ef-print-page-number></span>
</ef-print-footer>
Example 3

Accessible authored fallback

Meaningful fallback text remains visible when counters are unavailable.

Open standalone print preview

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
<p>Appendix content.</p>
<ef-print-page-number aria-label='Physical page number'>Pagination shown in supported PDF output</ef-print-page-number>