Copyright © 1999-2023 International Digital Publishing Forum and World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.
EPUB® 3 defines a distribution and interchange format for digital publications and documents. The EPUB format provides a means of representing, packaging, and encoding structured and semantically enhanced web content — including HTML, CSS, SVG, and other resources — for distribution in a single-file container.
This overview provides a general starting point for anyone curious to understand the features available in EPUB 3 publications. It is not intended as a technical introduction to the format or to building reading systems.
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
This document was published by the Publishing Maintenance Working Group as a Group Note using the Note track.
This Group Note is endorsed by the Publishing Maintenance Working Group, but is not endorsed by W3C itself nor its Members.
This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
The W3C Patent Policy does not carry any licensing requirements or commitments on this document.
This document is governed by the 03 November 2023 W3C Process Document.
The EPUB 3 format offers publishers the ability to create advanced reading experiences by leveraging the features and functionality of the Open Web Platform. The ability to use HTML, SVG, CSS, and JavaScript enables not only rich and interactive reading experiences but allows content to be produced for languages regardless of their default horizontal or vertical writing directions. The choice of these technologies also allows EPUB publications to be accessibly produced for a wide range of user needs.
This overview explores, at a high level, the authoring features of EPUB 3 that provide this functionality. This document is not intended as a tutorial on creating EPUB publications and does not delve into the technical details of the format or how reading systems operate. Rather, it is intended for a more general audience seeking to understand the benefits of creating their digital publications using the EPUB 3 format without having to read through technical specifications.
Before jumping straight into the features, however, it is helpful to have a basic conceptual understanding of how an EPUB publication is constructed. An EPUB file is effectively just a ZIP file with some identifying metadata that allows reading systems to recognize and render the publication inside (the ZIP file is formally called the EPUB container in the specifications).
One of the key files in this rendering process is called the package document. It provides the metadata about the publication, lists all of the resources, and specifies the order in which to present the EPUB content documents (i.e., the XHTML and SVG documents that, when rendered, provide the content).
The other key file is the EPUB navigation document. This document includes the table of contents for the publication as well as any other navigation aids the publisher has defined (e.g., a page list or list of landmarks).
The following figure visually represents the structure of an EPUB publication:
'EPUB (OCF) container' as the outer most component which encapsulates the 'EPUB publication' containing two documents 'Publication Document' and 'EPUB navigation document' along with a inner component labelled 'publication resources' which contains multiple 'EPUB content documents' (XHTML, SVG), and multiple 'Other resources' (CSS, png, mp3, mov, etc.).
The body of this document explores these resources in greater detail with the goal of providing greater insight into the array of features they enable in EPUB 3 publications.
For those interested in going beyond the general introduction presented in this document, the EPUB 3.3 specification [epub-33] contains all the essential authoring information.
Prior to EPUB 3.3, reading the EPUB 3 specifications could be challenging. The format was split across multiple documents, and each document interspersed authoring and reading system requirements. With the release of EPUB 3.3, however, there is now only one the document to read.
In addition, accessibility requirements for EPUB publications are described in the EPUB Accessibility specification [epub-a11y-11]. One of the great advantages of a digital format like EPUB 3 is that it breaks down the accessibility barriers of static print content. When constructed with accessibility in mind, publications are usable by users with diverse needs.
While reading the Reading Systems specification [epub-rs-33] can help understand how content gets rendered, the technical details of this process are not necessary for authoring content.
For a list of all the recommendation-track EPUB 3 specifications and non-normative notes, refer to A. EPUB 3 documents.
An initial point of confusion for people new to EPUB is the difference between "EPUB 3" the format and the EPUB 3 specification numbering. The current version of EPUB 3 is defined in the EPUB 3.3 specification [epub-33]. The minor number attached to the specification (".3") differentiates one release of the specification from the next, but each new release does not represent a new format.
The W3C working group that maintains EPUB 3 strives not to invalidate content produced to earlier versions of the specification, so an EPUB 3 publication produced to the EPUB 3.0 specification, for example, should also be valid to the EPUB 3.3 requirements.
That is also why this overview is for "EPUB 3", as it typically does not change significantly from one specification release to the next.
For a general overview of the changes made in each revision, refer to B. EPUB revision history.
An EPUB publication is transported and interchanged as a single file (a "portable document") that contains the package document(s), the EPUB content documents, and all other required resources for processing the publication. 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 the publication 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.
It also ensures that EPUB publications are creatable and editable using widely available ZIP tools. Publishers have the flexibility to use either commercially available editing applications or build their own content transformation pipelines.
For more information about an EPUB publication's representation as a container file, refer to Open Container Format (OFC) [epub-33].
Every EPUB publication 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.
The package document defines a layer on top of the traditional structuring of a typical web site to
facilitate the authoring of digital publications. 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 [epub-33] does (i.e., it provides an external declarative means to explicitly
specify navigation through a collection of documents).
The package document also provides a standard way to represent metadata globally
applicable to the content. Each package document includes a metadata section [epub-33] for general information about the EPUB publication, allowing
titles, authors, identifiers, and other information to be easily accessed and presented to users. It
also provides the means to attach complete bibliographic records using the link
element
[epub-33].
The package document also allows a unique identifier to be established for the EPUB publication using
the unique-identifier
attribute [epub-33]. This identifier provides a way for publishers to differentiate one
publication from another, and even one edition from another.
For more information about the package document, refer to Package document [epub-33].
Each EPUB publication contains one or more EPUB content documents, as defined in EPUB content documents [epub-33]. 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].
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 many popular web sites now have layouts with less flexibility.
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 publishers to define the desired rendering properties. EPUB 3 follows support for CSS as defined in the [csssnapshot].
EPUB 3 also supports CSS styles that enable both horizontal and vertical layout and both left-to-right and right-to-left writing.
EPUB 3 supports the embedding of audio and video in XHTML content documents via the [html]
audio
and video
elements, inheriting all the functionality
and features these elements provide (e.g., built-in start, stop, and volume controls). For more
information on the audio and video formats EPUB 3 supports, refer to the section on core media types [epub-33].
EPUB 3 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 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. Refer to Font Obfuscation [epub-33] for more information.
EPUB strives to treat content declaratively — as data that can be manipulated, not as programs to be executed — but does support scripting as defined in [html] and [svg]. This allows publishers to build and add dynamic content such as quizzes, interactive games, and so forth.
Scripting in an EPUB publication can create security considerations that are different from scripting within a web browser, however. For example, typical same-origin policies are not applicable to content that has been downloaded to a user's local system. For these reasons, scripting is best limited 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.
It is also important to note that EPUB 3 does not require scripting support in reading systems, and scripting might be disabled for security reasons. Publishers need to consider how their publications will remain readable by users before scripting content essential to its understanding.
Refer to Scripting [epub-33] for more information on scripting capabilities.
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.
Publishers can use both RDFa [rdfa-in-html] and Microdata [microdata] attributes for this
purpose, and also embed JSON-LD metadata records [json-ld] in the [html] script
element.
EPUB 3 also includes the epub:type
attribute [epub-33] for adding additional information to
any element in an EPUB content document to express its purpose and meaning within the work.
Although these semantics are primarily for use in publishers' internal workflows, they do provide enhanced reading system behaviors in some cases (specifically, for pop-up footnotes).
Refer to Expressing structural semantics [epub-33] for more information.
At its core, EPUB is designed for dynamic layout: content is typically intended to be formatted on the fly rather than being typeset in a paginated manner in advance. This core capability is useful for optimizing rendering onto different-sized device screens or window sizes, and it facilitates and simplifies content accessibility.
EPUB 3 also offers metadata allowing publishers to specify their preferred rendering of reflowable content. Supporting reading systems could offer users a scrolled view of a reflowable document, for example, instead of paginating it.
For more information, refer to Reflowable layouts [epub-33].
Although EPUB's history is steeped in enabling reflowable content, not all publications lend themselves easily to reflowing. Page-precise layouts are required to meaningfully represent children's books, comics and manga, magazines, and many other content forms.
EPUB 3 includes metadata that allows the creation of fixed-layout XHTML content documents [epub-33], in addition to existing capabilities for fixed layouts in SVG. This metadata enables the control of the page dimensions [epub-33], 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 publishers to specify the desired orientation of pages [epub-33], when to create synthetic spreads [epub-33], and how to position pages [epub-33] within those spreads, providing a broad range of control over the presentation of EPUB publications.
For more information, refer to Fixed layouts [epub-33].
Another key multimedia feature of EPUB 3 is the ability to define media overlays. When pre-recorded narration is available for an EPUB publication, media overlays provide the ability to synchronize the playback of that audio with the text of an EPUB content document. Users can watch as the text of the publication is highlighted while it is read back to them, or just listen to the audio.
Media overlays have benefits beyond the obvious accessibility one of allowing users who cannot see the content to listen to it. They are used, for example, to synchronize text and audio as a tool for learning to read.
For more information about creating media overlays, refer to Media overlays [epub-33].
EPUB 3 leverages the features in XHTML, SVG, CSS, or MathML for global language support, and it also relies on [unicode] for encoding the content. This means that EPUB content documents have the possibility to use different character sets and express bidirectional text, ruby annotations, or typography for many different languages and cultures.
The following list describes some of the key additions for global language support that are specific to EPUB 3:
EPUB 3 supports alternate representations of all text metadata items in the package metadata
section to improve global distribution of EPUB publications. The alternate-script
property [epub-33]
can be combined with the xml:lang
attribute to include and identify alternate
script renderings of language-specific metadata.
Using this property, a Japanese EPUB publication could, for example, include an alternate Roman-script representation of the author's name and/or one or more representations of the title in a Romance language.
Text metadata items may also rely on attributes specifying base direction [epub-33] that allow for a finer control of bidirectional texts (e.g., titles that combine Latin and Arabic or Hebrew characters).
The page-progression-direction
attribute in the package document allows the
content flow direction to be globally specified for all EPUB content documents to facilitate
rendering (see the page-progression-direction [epub-33]).
EPUB 3 does not require that reading systems come with a 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.
EPUB 3's support for embedding fonts facilitates the rendering of text content by ensuring content is rendered as intended.
Support for embedded fonts also ensures that publishers can embed characters and glyphs unique to an EPUB publication for proper display.
The OCF container format supports UTF-8, allowing for internationalized file and directory naming of content resources.
A major goal of EPUB is to facilitate content accessibility, and a variety of features in EPUB 3 support this requirement. More specifically, the EPUB Accessibility specification [epub-a11y-11] provides a framework for evaluating the accessibility of EPUB publications. It leverages the extensive work done to define web content accessibility in the Web Content Accessibility Guidelines [wcag21], an internationally recognized standard for content accessibility.
The specification defines requirements to produce EPUB publications that can be accessed by a wide range of users. It is accompanied by a techniques document [epub-a11y-tech-11] that outlines best practices for meeting these 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.
Some specific content features of EPUB 3 that enable the creation of highly accessible content include:
Compared to EPUB 2, the version of HTML supported in EPUB 3 incorporates a number of new elements
that make markup more semantically meaningful. These include, for example, the [html]
section
, nav
, and aside
elements. These additions allow content to be better grouped
and defined, both to represent the structure of documents and to facilitate their logical
navigation.
The [html] audio
and video
elements come with built-in controls that
work with assistive technologies. These new elements allow users to control playback, no longer
requiring plugins with poor accessibility support.
The default for EPUB publications is to reflow to fit the available screen space. This allows users to change the display to their liking (e.g., increasing font size, line spacing, and word spacing) without causing a publication to become unreadable — the resized content re-adapts itself to the available space.
EPUB includes support for expressing ARIA roles, states, and properties both in XHTML and SVG content documents. These attributes allow publishers to improve the accessibility of scripted controls and components.
EPUB 3 is continuously evolving with the web to adapt new features and technologies. The specification references a number of web standards that automatically becomes valid to use as soon as they change. HTML, for example, is now called a "living standard" because new features are added once there are at least two implementations. EPUB 3 also references versions of SVG [svg], JavaScript [ecmascript], and Unicode [unicode] that adapt to new releases, and the CSS reference is tied to the latest snapshot [csssnapshot].
What this means for EPUB 3 is that as new features are added to these standards, they are also immediately valid to use in EPUB publications. (That does not mean it is always wise to use such features right away, as reading systems often take longer to implement support, and vendors may not always allow the new features past their validation routines.)
The EPUB Working Group may also introduce new and experimental features from time-to-time outside of the core specifications. This is typically done because the features do not have sufficient real-world support in reading systems yet, or because the Working Group is looking for implementation feedback before trying to standardize the technology.
There are currently two such experimental features: multiple-rendition publications [epub-multi-rend-11] and text-to-speech enhancements [epub-tts-10]. Publishers may use these features in their publications but should do so with the awareness that there may be limited support.
EPUB 3 is currently defined by the following specifications:
Although the following documents are informative, they provide guidance related to implementing the EPUB 3 specifications as well as define experimental features.
EPUB has its roots in the interchange format known as the Open EBook Publication Structure (OEBPS). OEBPS 1.0 was approved in 1999 by the Open eBook Forum, an organization that later became the International Digital Publishing Forum (IDPF). Subsequent revisions 1.1 and 1.2 were approved by the IDPF in 2001 and 2002, respectively.
It was realized that a need existed for a format standard that could be used for delivery as well as interchange, and work began in late 2005 on a single-file container format for OEPBS, which was approved by the IDPF as the OEBPS Container Format (OCF) in 2006. Work on a 2.0 revision of OEBPS began in parallel which was renamed EPUB 2.0 in October 2007 and approved in September 2010. This revision consisted of a triumvirate of specifications: Open Package Format (OPF), Open Publication Format (OPF), and OCF. EPUB 2.0.1, which was a maintenance update to the 2.0 specification set, primarily intended to clarify and correct errata in the specifications. See [opf-201] [ops-201] [ocf-201].
Work on a major revision of the EPUB specifications began in 2010, with the goal of aligning EPUB more closely with HTML, and in the process bringing new, native multimedia features, sophisticated CSS layout rendering and font embedding, MathML support, scripted interactivity, vertical writing and other enhanced global language support, and improved accessibility. A new specification for EPUB Media Overlays was also introduced, allowing for text and audio synchronization in EPUB publications. To better align the specification names with the standard, the Open Package Format specification was renamed EPUB publications, and the Open Publication Format specification was renamed EPUB Content Documents. The EPUB 3.0 specifications were approved in October 2011. See [epubpublications-30] [epubcontentdocs-30] [ocf-30] [epubmediaoverlays-30] [epubchanges-30].
The EPUB 3.0.1 revision was undertaken in 2013-14. Although introducing mostly minor fixes and updates, it did see the integration of Fixed Layout Documents, which give publishers greater control over presentation when a reflowable EPUB is not suitable for the content. See [epubpublications-301] [epubcontentdocs-301] [ocf-301] [epubmediaoverlays-301] [epubchanges-301].
EPUB 3.1 was the first minor revision of EPUB 3. The goal of this revision was to better align EPUB 3 with current web standards. References to important standards were made undated, meaning that whenever they are updated they are legal to use in EPUB 3 content (e.g., the latest version of HTML is always valid to use; a revision of EPUB is not needed). The use of CSS was also clarified, and the use of EPUB-specific properties reduced.
Many EPUB-specific features were also removed from the standard, in particular content switching, triggers, and bindings. This change necessitated a new package document version number. See [epub-31] [epubpackages-31] [epubcontentdocs-31] [ocf-31] [epubmediaoverlays-31] [epubchanges-31]
The work on EPUB 3.2 was undertaken shortly after EPUB 3.1 to restore compatibility of content to EPUB 3. The change of version number introduced in EPUB 3.1 meant that publishers, vendors and reading system developers would have to produce, distribute, and consume two versions of EPUB content, but the costs of this change outweighed the benefits of the new version. EPUB 3.2 instead keeps all the best parts of EPUB 3.1 but deprecates elements instead of removing them so that a new version number is not necessary in the package document. See [epub-32] [epubpackages-32] [epubcontentdocs-32] [ocf-32] [epubmediaoverlays-32] [epubchanges-32]
The work on EPUB 3.3 [epub-33] was undertaken in 2020-21, and is the first version of the EPUB 3 series published as a W3C Recommendation. EPUB 3.3 does not include any significant technical change to, and is strongly backward compatible with, EPUB 3.2. This means that any valid EPUB 3.2 Publication is also a valid EPUB 3.3 Publication.
The documents themselves have been restructured. The primary motivation for this restructuring, as well as an extensive editorial revision, was to make the documents more readable. Also, as part of the thorough testing regime developed by the W3C EPUB 3 Working Group, this restructuring led to the separation of Recommendations and Working Group Notes (see also the detailed list of documents ). Features specified in the Recommendations are thoroughly tested, are widely implemented in reading systems, and they can be considered as interoperable. On the other hand, features specified in Working Group Notes, although they may have some authoring uptakes, still lack support in reading systems; as a result, these technologies should not yet be considered stable and interoperable.
The separate section in [epub-33] provides a more detailed overview of the changes.
epub:type
attribute
link
element
spine
element
aside
element
audio
element
ruby
element
script
element
section
element
video
element
This section is non-normative.
Specifications, like art, are human creations. No human has done more for EPUB than Garth Conboy, who has been there every step of the way, from the very first OEB 1.0 in 1999 to today's EPUB 3.3. None of this would have happened without Garth's vision, knowledge, and preternatural good nature. We dedicate EPUB 3.3 to his memory. We are forever in your debt, Garth.
The following members of the EPUB 3 Working Group contributed to the development of this specification:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: