EPUB 3.1 Overview

Proposed Informational Document 30 November 2016

This version
Latest version
Previous version
Previous recommendation
Document history


Garth Conboy, Google Inc.

Matt Garrish, Invited Expert

Markus Gylling, International Digital Publishing Forum (IDPF)

William McCoy, International Digital Publishing Forum (IDPF)

MURATA Makoto, JEPA EPUB Study Group

Daniel Weck, DAISY Consortium

Copyright © 2010-2016 International Digital Publishing Forum™

All rights reserved. This work is protected under Title 17 of the United States Code. Reproduction and dissemination of this work with changes is prohibited except with the written permission of the International Digital Publishing Forum (IDPF).

EPUB is a registered trademark of the International Digital Publishing Forum.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents might supersede this document.

This document is a draft produced by the EPUB Working Group under the EPUB Working Group Charter approved on 8 July 2015.

This document is not considered stable and might be updated, replaced or obsoleted at any time. Its publication as a draft does not imply endorsement by IDPF membership or the IDPF Board. When citing this document, clearly refer to it as a work in progress.

Feedback on this document can be provided to the EPUB Working Group's mailing list or issue tracker.

This document is governed by the IDPF Policies and Procedures.

This document is informative.

  1 Introduction

  1.1 Overview

This document provides a starting point for content authors and software developers wishing to understand the EPUB® 3.1 specifications. It consists entirely of informative overview material that describes the features available in EPUB 3.1.

Another informative document, EPUB 3.1 Changes from EPUB 3.0.1 [EPUB3 Changes], describes changes in EPUB 3.1 from the last version.

  2 Features

This section covers the major features of EPUB, including important components and topics that apply to the process of authoring EPUB Publications as a whole.

  2.1 Package Document

Every EPUB Publication contains at least one Rendition of its contents, each of which is represented by a Package Document.

The Package Document specifies all the resources required to render that representation of the content. The Package Document also defines a reading order for linear consumption, and associates metadata and navigation information for the Rendition.

The Package Document represents a significant improvement on a typical Web site. A Web site, for example, embeds references to its resources within its content, which, while a simple and flexible means of identifying resources, makes it difficult to enumerate all the resources required to render it. In addition, there is no standard way for a Web site to define that a sequence of pages make up a larger publication, which is precisely what EPUB's spine element [Packages 3.1] does (i.e., it provides an external declarative means to explicitly specify navigation through a collection of documents). Finally, the Package Document defines a standard way to represent metadata globally applicable to a collection of pages.

The Package Document also includes a collection element [Packages 3.1], which allows grouping of logically-related Publication Resources. This element exists to enable the development of specialized content identification, processing and rendering features, such as the ability to define embedded preview content, or assemble an index or dictionary from its constituent XHTML Content Documents.

The Package Document and other Rendition-specific constructs are specified in [Packages 3.1].

  2.2 Navigation

  2.2.1 Reading Order

A key concept of EPUB is that an EPUB Publication consists of multiple resources that can be completely navigated and consumed by a person or program in some specific order.

Many types of publication have an obvious reading order, or logical progression through their content. A novel is an example of a highly sequential document — it typically has a beginning, middle and end — but not all publications are so ordered: a cookbook or collection of photographic images might be considered to be more like a database. All documents do, however, have at least one logical ordering of all their top-level content items, whether by date, topic, location or some other criteria (e.g., a cookbook is typically ordered by type of recipe).

Each Rendition of an EPUB Publication defines at least one such logical ordering of all its top-level content (the spine [Packages 3.1]), as well as a declarative table of contents (the EPUB Navigation Document [EPUB 3.1]). EPUB Publications make these data structures available in a machine-readable way external to the content, simplifying their discovery and use.

EPUB Publications are not limited to the linear ordering of their contents, nor do they preclude linking in arbitrary ways — just like the Web, EPUB Publications are built on hypertext — but the basic consumption and navigation can be reliably accomplished in a way that is not true for a set of HTML pages.

  2.2.2 Navigation Document

Each Rendition of an EPUB Publication contains a special XHTML Content Document called the EPUB Navigation Document, which uses the [HTML] nav element to define human- and machine-readable navigation information.

The Navigation Document replaces the EPUB 2 NCX document [OPS2]. The Navigation Document, while maintaining the baseline accessibility and navigation support and features of the NCX, introduces new functionality and rendering features to enhance navigation for all users. Prime among these are better support for internationalization (as an XHTML document itself, the Navigation Document natively supports ruby annotations) and support for embedded grammars (MathML and SVG can be included within navigation links).

As XHTML Content Documents, Navigation Documents also provide a flexible means of tailoring the navigation display using CSS and the hidden attribute [Packages 3.1] while not impacting access to information for accessible Reading Systems.

The structure and semantics of Navigation Documents are defined in EPUB Navigation Document [Packages 3.1].

  2.3 Metadata

EPUB Publications provide a rich array of options for adding metadata. Each Rendition's Package Document includes a dedicated metadata section [Packages 3.1] for general information about the EPUB Publication, allowing titles, authors, identifiers and other information about the EPUB Publication to be easily accessed. It also provides the means to attach complete bibliographic records using the link element [Packages 3.1].

The Package Document also allows a Unique Identifier to be established for the EPUB Publication using the unique-identifier attribute [Packages 3.1]. The required last-modified date in the Package metadata section can be joined with this identifier to define a Release Identifier, which provides a means of distinguishing different versions of an EPUB Publication (see Publication Identifiers [Packages 3.1]). The Package Identifier addresses the issue of how to release an EPUB Publication without changing its Unique Identifier while still identifying it as a new version.

XHTML Content Documents also include the means of annotating document markup with rich metadata, making them more semantically meaningful and useful both for processing and accessibility purposes (XHTML Semantic Inflection [Content Docs 3.1]). Both RDFa and Microdata attributes can also be used in XHTML Content Documents, enabling content-level metadata expressions (XHTML Semantic Enrichment [Content Docs 3.1]).

  2.4 Content Documents

Each Rendition of an EPUB Publication contains one or more EPUB Content Documents, as defined in [EPUB 3.1]. These are XHTML or SVG documents that describe the readable content and reference associated media resources (e.g., images, audio and video clips).

XHTML Content Documents are defined by a profile of [HTML].

  2.5 Fixed Layouts

Although EPUB's history is steeped in enabling reflowable content, not all publications lend themselves easily to reflowing. Children's books, comics and manga, magazines and many other content forms require the ability to create page-precise layouts in order to be represented meaningfully.

EPUB 3.1 includes metadata that allows the creation of fixed-layout XHTML Content Documents [Packages 3.1], in addition to existing capabilities for fixed layouts in SVG. This metadata enables the dimensions of the page [Content Docs 3.1] to be controlled, creating a canvas on which elements can be absolutely positioned.

The metadata does not just flag whether content is to be fixed or reflowed, but also allows Authors to specify the desired orientation of pages [Packages 3.1], when to create synthetic spreads [Packages 3.1], and how to position pages [Packages 3.1] within those spreads, providing a broad range of control over the presentation of EPUB Publications.

  2.6 Rendering and CSS

A key concept of EPUB is that content presentation adapts to the user, rather than the user having to adapt to a particular presentation of content. HTML was originally designed to support dynamic rendering of structured content, but over time HTML as supported in Web browsers has become focused on the needs of Web applications, and most popular Web sites now have fixed-format layouts.

EPUB Publications, however, are designed to maximize accessibility for the visually impaired, and Reading Systems typically perform text line layout and pagination on the fly, adapting to the size of the display area, the user's preferred font size, and other environmental factors. This behavior is not guaranteed in EPUB; images, vector graphics, video and other non-reflowable content might be included, and some Reading Systems might not paginate on the fly, or at all. Nevertheless, supporting dynamic adaptive layout and accessibility has been a primary design consideration throughout the evolution of the EPUB standard.

EPUB Content Documents can reference CSS Style Sheets, allowing Authors to define the desired rendering properties. EPUB 3.1 follows support for CSS as defined in the [CSS Snapshot].

EPUB 3.1 also supports CSS styles that enable both horizontal and vertical layout and both left-to-right and right-to-left writing. Refer to CSS in the Global Language Support section for more information.

EPUB 3.1 also includes the ability to provide multiple style sheets that allow users to select between day/night reading modes or change the rendering direction of the text. Refer to [Alt Style Tags] for more information.

  2.7 Multimedia

EPUB 3.1 supports audio and video embedded in XHTML Content Documents via the [HTML] audio and video elements, inheriting all the functionality and features these elements provide. For more information on audio and video formats, refer to [Core Media Types].

Another key multimedia feature in EPUB 3.1 is the inclusion of Media Overlay Documents [Media Overlays 3.1]. When pre-recorded narration is available for a Rendition of an EPUB Publication, Media Overlays provide the ability to synchronize that audio with the text of a Content Document (see also Aural Renditions and Media Overlays).

  2.8 Fonts

EPUB 3.1 supports two closely-related font formats — OpenType [OpenType] and WOFF [WOFF] [WOFF2] — to accommodate both traditional publishing workflows and emerging Web-based workflows. Word processing programs used to create EPUB Publications are likely to have access only to a collection of installed OpenType fonts, for example, whereas Web-archival EPUB generators will likely only have access to WOFF resources (which cannot be converted to OpenType without undesirable, and potentially unlicensed, stripping of WOFF metadata).

EPUB 3.1 also supports both obfuscated and regular font resources for both OpenType and WOFF font formats. Support for obfuscated font resources is required to accommodate font licensing restrictions for many commercially-available fonts.

  2.9 Scripting

EPUB strives to treat content declaratively — as data that can be manipulated, not programs to be executed — but does support scripting as defined in [HTML] and [SVG] (refer to Scripting [Content Docs 3.1] for more information).

It is important to note, however, that EPUB 3 does not require scripting support in Reading Systems, and scripting might be disabled for security reasons.

Authors need to be aware that scripting in an EPUB Publication can create security considerations that are different from scripting within a Web browser. For example, typical same-origin policies are not applicable to content that has been downloaded to a user's local system. Therefore, it is strongly encouraged that scripting be limited to container constrained contexts, as further described in Scripted Content Documents — Content Conformance [Content Docs 3.1].

In other words, consider limiting scripting to cases where it is essential to the user experience, since it greatly increases the likelihood that content will not be portable across all Reading Systems and creates barriers to accessibility and content reusability.

  2.10 Text-to-speech

EPUB 3.1 provides the following text-to-speech (TTS) facilities for controlling aspects of speech synthesis, such as pronunciation, prosody and voice characteristics:

Pronunciation Lexicons

The inclusion of generic pronunciation lexicons using the W3C PLS format [PLS] enables Authors to provide pronunciation rules that apply to the entire EPUB Publication. Refer to Pronunciation Lexicons [Content Docs 3.1] for more information.

Inline SSML Phonemes

The incorporation of SSML phonemes functionality [SSML] directly into a EPUB Content Document enables fine-grained pronunciation control, taking precedence over default pronunciation rules and/or referenced pronunciation lexicons (as provided by the PLS format mentioned above). Refer to SSML Attributes [Content Docs 3.1] for more information.

  2.11 Container

An EPUB Publication is transported and interchanged as a single file (a "portable document") that contains the Package Documents, all Content Documents and all other required resources for processing the included Renditions. The single-file container format for EPUB is based on the widely adopted ZIP format, and an XML document that identifies the location of the Package Document for each Rendition in the ZIP archive is located at a pre-defined location within the archive.

This approach provides a clear contract between any creator of an EPUB Publication and any system which consumes such EPUB Publications, as well as a reliable representation that is independent of network transport or file system specifics.

An EPUB Publication's representation as a container file is specified in [OCF 3.1].

  3 Global Language Support

  3.1 Metadata

EPUB 3.1 supports alternate representations of all text metadata items in the package metadata section to improve global distribution of EPUB Publications. The opf:alt-rep attribute [Packages 3.1] provides the ability to include and identify alternate script renderings of language-specific metadata.

Using this attribute, a Japanese EPUB Publication could, for example, include an alternate Roman-script representation of the author's name and/or an alternative representations of the title in a Romance language.

The page-progression-direction attribute also allows the content flow direction to be globally specified for all Content Documents to facilitate rendering (see the page-progression-direction [Packages 3.1]).

  3.2 Content Documents

XHTML Content Documents leverage the HTML directionality features to improve support for bidirectional content rendering: the bdi element allows an instance of directional text to be isolated from the surrounding content, the bdo element allows directionality to be overridden for its child content and the dir attribute allows the directionality of any element to be explicitly set.

XHTML Content Documents also support ruby annotations for pronunciation support (which makes them supported in Navigation Document links, as well).

SVG Content Documents support the rendering of bidirectional text, but do not include support for ruby.

  3.3 CSS

EPUB 3.1's support for CSS3 modules enables typography for many different languages and cultures. Some specific enhancements include:

  • support for vertical writing, which also provides Reading Systems the ability to allow users to toggle direction;

  • better handling of emphasis, such as the inclusion of bōten;

  • better control over line breaking, so that breaks can occur at the character level for languages that do not use spaces to delimit new words; and

  • better control over hyphenation, to further facilitate line breaking.

  3.4 Fonts

EPUB 3.1 does not require that Reading Systems come with any particular set of built-in system fonts. As occurs in Web contexts, users in a particular locale might have installed fonts that omit characters required for other locales, and Reading Systems might utilize intrinsic fonts or font engines that do not utilize operating system installed fonts. As a result, the text content of an EPUB Publication might not natively render as intended on all Reading Systems.

To address this problem, EPUB 3.1 supports the embedding of fonts to facilitate the rendering of text content, and this practice is advised in order to ensure content is rendered as intended.

Support for embedded fonts also ensures that characters and glyphs unique to an EPUB Publication can be embedded for proper display.

  3.5 Text-to-speech

EPUB 3.1's support for PLS documents and SSML attributes increases the pronunciation control that Authors have over the rendering of any natural language in text-to-speech-enabled Reading Systems. Refer to Text-to-speech in the Features section for more information on these capabilities.

The combination of CSS Speech and inline SSML phonemes also allows fine control over ruby.

  3.6 Container

The OCF container format supports UTF-8, allowing for internationalized file and directory naming of content resources.

  4 Accessibility

A major goal of EPUB is to facilitate content accessibility, and a variety of features in EPUB 3.1 support this requirement. This section reviews these features, detailing some established best practices for ensuring that EPUB Publications are accessible where applicable.

EPUB 3.1 also includes an Accessibility specification [EPUB Accessibility] that leverages the extensive work done to make Web content accessible in [WCAG 2.0]. The specification defines requirements for the production of EPUB Publications that can be accessed by a wide range of users. It is accompanied by a techniques document that outlines best practices for meeting the requirements.

It is important to note that while accessibility is important in its own right, accessible content is also more valuable content: an accessible EPUB Publication will be adaptable to more devices and be easier to reuse, in whole or in part, via human and automated workflows. The EPUB Working Group strongly recommends that Authors ensure that they generate accessible content.

  4.1 Navigation

EPUB 3.1 improves on NCX documents with the addition of EPUB Navigation Documents. As noted in Navigation Document above, the navigation features represent a more universal and flexible navigation system.

The Navigation Document can also be reused in the body of an EPUB Publication by including it in the spine. To avoid the situation in highly structured documents where it might not be desirable to display the complete table of contents to users in the body, the display level can be modified using the [HTML] hidden attribute. This attribute is ignored by Reading Systems when they render the table of contents outside the spine (e.g., in their own specialized views), which avoids minimizing the information that is available.

Authors are also encouraged to supply additional nav elements if their EPUB Publications contain non-structural points of interest, such as figures, tables, etc. in order to further enhance access to the content.

  4.2 Semantic Markup

[HTML] supports a number of elements that make markup more semantically meaningful (e.g., section, nav and aside) and introduces more clearly defined semantics for some HTML4 elements. Make use of these elements, in conjunction with best practices for authoring well-structured Web content, when creating EPUB XHTML Content Documents. These additions allow content to be better grouped and defined, both for representing the structure of documents and to facilitate their logical navigation. XHTML Content Documents also natively support the inclusion of ARIA role and state attributes and events, enhancing the ability of Assistive Technologies to interact with the content.

EPUB 3.1 includes the epub:type attribute, which is meant to be functionally equivalent to the W3C Role Attribute [Role]. This attribute allows any element in an XHTML Content Document to include additional information about its purpose and meaning within the work, using controlled vocabularies and terms. Refer to XHTML Semantic Inflection [Content Docs 3.1] for more information.

  4.3 Dynamic Layouts

The design center of EPUB is dynamic layout: content is typically intended to be formatted on the fly rather than being typeset in a paginated manner in advance (i.e., expecting a particular sized "page"). This core capability is useful, for example, for optimizing rendering onto different sized device screens or window sizes, and it facilitates and simplifies content accessibility.

While it is possible to incorporate more highly formatted content in EPUB — for example via bitmap images or SVG graphics, or even use of CSS explicit positioning and/or table elements to achieve particular visual layouts — Authors are strongly discouraged from utilizing such techniques. They are not reliable in EPUB since many Reading Systems render content in a paginated manner rather than creating a single scrolling Viewport and since each Reading System might define its own pagination algorithm. If these techniques are necessary to convey the content of the publication, consider including fallbacks [EPUB 3.1] (e.g., for graphic novels).

In general, it is preferable to achieve visual richness by using CSS Style Sheets without absolute sizing or positioning.

  4.4 Aural Renditions and Media Overlays

Aural renderings of content are important for accessibility and are a desirable feature for many other users. A baseline to facilitate aural rendering is to utilize semantic HTML designed for dynamic layout. Refer to Text-to-speech for more information on how to use the native facilities that EPUB XHTML Documents include.

[Media Overlays 3.1] provides the ability to synchronize the text and audio content of an EPUB Publication, a feature already familiar to readers of DAISY Digital Talking Books. Overlays transcend the accessibility domain in their usefulness: the synchronization of text and audio as a tool for learning to read, for example, being of benefit in many circumstances.

  4.5 Fallbacks

Not all formats are accessible in their native format, and not all users prefer to read in the default format provided. EPUB defines a variety of means for providing fallbacks so that alternate renderings can be made available in these cases.

Publication- and content-level fallbacks are defined in Foreign Resources [EPUB 3.1]. These fallback mechanisms enable the inclusion of Foreign Resources in an EPUB Publication and ensure compatibility of EPUB 3.1 content across Reading Systems with varying capabilities (e.g., they allow the inclusion of multiple video formats, and the inclusion of XHTML fallbacks to SVG Content Documents for EPUB 2 Reading Systems).

In addition, multiple instances of a complete work can be delivered in a single EPUB Publication by defining multiple rootfile elements in the OCF container file (as described in Container File (container.xml) [OCF 3.1]). These alternate Rendition fallbacks might be used, for example, so that a formatted graphic novel defined via a sequence of SVG pages can be accompanied by an accessible text version defined via XHTML.

  4.6 Scripting

EPUB 3.1 adopts a progressive enhancement approach for scripted content, whereby scripting has to not interfere with the integrity of the document (i.e., not result in information loss when scripting is not available). Consequently, although documents that do employ scripting can provide fallbacks [Content Docs 3.1] to further facilitate access to their contents, the documents have to be accessible without them.

Ensure that you always implement best practices for accessible scripting in Web documents, such as provided in [WAI-ARIA], and reserve the use of scripting for situations in which interactivity is critical to the user experience.

  Acknowledgements and Contributors

This section is informative

EPUB 3.1

EPUB has been developed by the International Digital Publishing Forum in a cooperative effort, bringing together publishers, vendors, software developers, and experts in the relevant standards.

The EPUB 3.1 specifications were prepared by the International Digital Publishing Forum’s EPUB Maintenance Working Group, operating under a charter approved by the membership in July 2015, under the leadership of:

Active members of the working group at the time of publication of revision 3.0 were:

IDPF Members

Invited Experts/Observers

EPUB 3.0

Version 3.0 of this specification was prepared by the International Digital Publishing Forum’s EPUB Maintenance Working Group under the leadership of:

Active members of the working group at the time of publication of revision 3.0 were:

IDPF Members

Invited Experts/Observers

EPUB 2.0.1

Version 2.0.1 of this specification was prepared by the International Digital Publishing Forum’s EPUB Maintenance Working Group under the leadership of:

Active members of the working group at the time of publication of revision 2.0.1 were:

EPUB 1.0

Version 1.0 of this specification was prepared by the International Digital Publishing Forum’s Unified OEBPS Container Format Working Group under the leadership of:

Active members of the working group at the time of publication of revision 1.0 were:


Normative References

[Alt Style Tags] Alternate Style Tags . Elika J. Etemad.

[CSS Snapshot] CSS Snapshot .

[Content Docs 3.1] EPUB Content Documents 3.1 .

[Core Media Types] EPUB 3 Core Media Types.

[EPUB 3.1] EPUB 3.1 .

[EPUB Accessibility] EPUB Accessibility .


[Media Overlays 3.1] EPUB Media Overlays 3.1 .

[PLS] Pronunciation Lexicon Specification 1.0 (PLS) . Paolo Baggia. 14 October 2008.

[Packages 3.1] EPUB Packages 3.1 .

[SSML] Speech Synthesis Markup Language (SSML) Version 1.1 . Daniel C. Burnett, et al. 7 September 2010.

[WAI-ARIA] Accessible Rich Internet Applications (WAI-ARIA) 1.0 . James Craig, et al. 20 March 2014.

[WCAG 2.0] Web Content Accessibility Guidelines (WCAG) 2.0 . Ben Caldwell, et al.

[WOFF] WOFF File Format 1.0 . Jonathan Kew, et al. 13 December 2012.

[WOFF2] WOFF File Format 2.0 . Vladimir Levantovsky, et al.

Informative References

[Role] Role Attribute . An attribute to support the role classification of elements. McCarron, et al. 28 March 2013.