If an ebook is produced from the same workflow as a print document, print pagination markers should be retained in the document. These markers benefit readers in mixed print/digital environments, such as a classroom, as the page numbers allow a common point of reference between the two editions.
Page break locations can be added to the markup using span
and div
tags with an
epub:type
attribute set to the value pagebreak
.
When including page numbers, a page-list nav
should also
be included to faciliate navigation. The page-list nav
is used to look up the location of
the page break when the reader requests to move to a specific location. (An id
attribute
must be attached to each element containing a page number to allow creation of the page-list
nav
.)
When including print page references, the package document metadata should also include a dc:source
element
identifying the print source.
The EPUB Samples Project contains the following publications that include print page numbering:
pageList
elementThe page number always reflects the page that is starting.
No, page break markers are always placed at the start of the page's content, regardless of whether the page number is printed at the top or bottom of the page in the print edition. When a user jumps to a specific page, they want to jump to the start of the content for that page, not the end.
There are pros and cons to each approach.
If you include the page numbers as text content within a span
or div
,
the pages will be more easily accessible to both sighted readers and readers using assistive
technologies. This method has been employed in previous DAISY standards. The potential downside,
however, is that mainstream reading systems will not provide equivalent functionality to turn off
unwanted content, forcing readers to view the page numbers. Additionally, current assistive
technologies may not provide content filtering on the epub:type
attribute, also
interfering with reading.
Page numbers as empty elements are the more traditional mainstream approach, with anchor tags
having served this function in the past. Using the title
attribute on an empty
element, however, potentially complicates the rendering/announcing of the pages. Page numbers
that mix alphanumeric characters, for example, could not include both visual and aural
alternatives.
page-list nav
necessary?Although the page-list nav
provides readers a way
to manually look up pages, it is primarily intended to facilitate quick-access through the
reading system. To implement a feature that can jump a reader to a specific page that they voice
or type in, reading system need to be able to map the location quickly without having to randomly
load and scan content files. The page-list nav
is how these lookups occur.
List often break across pages, with one item ending at the bottom of one and a new item starting at the top of the next. In these cases, it's not possible to locate the page number between the two list items, as it's not valid for a list to contain anything but list items.
The obvious solutions are to either insert the page number as the very last element in the item that ends the page:
<li>….<span
epub:type="pagebreak"
id="page24"
title="24"/></li>
<li>…</li>
or to place it as the very first element in the list item that starts the page
<li>….</li>
<li><span
epub:type="pagebreak"
id="page24"
title="24"/>…</li>
Best practice at this time is to place the page break inside the concluding element, but both methods are acceptable. When included in the trailing list item, an assistive technology should announce the new list item that starts the next page to the reader, whereas if the page number starts the list item the reader may not be made aware they are in a list until reaching the next item.
One practice to avoid is creating a new list item just for the page break. As page breaks are often not visible content, an empty list item will be confusing to all readers.
a
tags for page numbers?The a
element has two specific uses defined in HTML5: for links when the
href
attribute is present, and for placeholder links when it is not (e.g., a
link that might be active in another context or after some interaction by the user). As page
breaks are not links, and are never intended to be activated as links, it is semantically
incorrect to use them for page breaks.