Copyright © 2017. This document is available under theW3C Document License. See theW3C Intellectual Rights Notice and Legal Disclaimers for additional information.
EPUB 3.1 is an interchange and delivery format for digital publications based on XML and Web Standards.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of currentW3C publications can be found in theW3C technical reports index at https://www.w3.org/TR/.
By publishing this document,W3C acknowledges that theSubmitting Members have made a formal Submission request toW3C for discussion. Publication of this document byW3C indicates no endorsement of its content byW3C, nor thatW3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a charteredW3C group, but is published as potential input to theW3C Process. AW3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at theW3C site is one of the benefits ofW3C Membership. Please consult the requirements associated with Member Submissions ofsection 3.3 of theW3C Patent Policy. Please consult the completelist of acknowledgedW3C Member Submissions.
This section is non-normative.
This specification, EPUB 3.1, 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.
EPUB has been widely adopted as the format for digital books (ebooks), and EPUB 3.1 continues to increase the format's capabilities in order to better support a wider range of publication requirements, including complex layouts, rich media and interactivity, and global typography features. The expectation is that the EPUB 3.1 format will be utilized for a broad range of content, including books, magazines and educational, professional and scientific publications.
EPUB 3.1 is modular in nature: it consists of a family of specifications that define the core features and functionality of the standard. This specification represents the primary entry point to standard, but the specifications listed inSpecifications are all a part of EPUB 3.1. Anindex to key concepts and definitions defined across these specifications is provided at the end of this specification.
The informative[EPUB3 Overview] provides a general introduction to EPUB 3.1. A list of technical changes from EPUB 3.0.1, the previous version of the standard, is also available in the informative[EPUB3 Changes].
The following terms are specific to EPUB 3.1. They are capitalized wherever used.
Only the first instance of a term in a section is linked to its definition.
The person(s) or organization responsible for the creation of anEPUB Publication. The Author is not necessarily the creator of the content.
The area within theViewport dedicated to the display ofEPUB Content Documents. The Content Display Area excludes any borders, margins, headers, footers or other decoration aEPUB Reading System might inject into the Viewport.
In the case ofsynthetic spreads, the Viewport contains two Content Display Areas.
A media type[RFC2046] thatEPUB Reading Systems have to support. Refer toPublication Resources for more information.
APublication Resource that has aCore Media Type so does not require the provision of afallback (cf.Foreign Resource).
The ZIP-based packaging and distribution format forEPUB Publications defined inOCF ZIP Container[OCF 3.1].
APublication Resource that conforms to one of the EPUB Content Document definitions (HTML orSVG).
An EPUB Content Document is aCore Media Type Resource, so can be included in theEPUB Publication without the provision offallbacks.
A specialization of theXHTML Content Document that contains human- and machine-readable global navigation information. The EPUB Navigation Document conforms to the constraints expressed inEPUB Navigation Document[Packages 3.1].
A logical document entity consisting of a set of interrelatedresources representing oneRendition of anEPUB Publication, as defined by aPackage Document.
A collection of one or moreRenditions that conform to this specification, packaged in anEPUB Container.
An EPUB Publication typically represents a single intellectual or artistic work, but this specification does not circumscribe the nature of the content.
A system that processesEPUB Publications for presentation to a user in a manner conformant with this specification.
AnEPUB Content Document directly referenced from thespine that has been designatedpre-paginated
in thePackage Document, as defined inTherendition:layout Property[Packages 3.1].
The dimensions to use for rendering Fixed-Layout Documents are defined inFixed Layouts[Content Docs 3.1].
APublication Resource that is not aCore Media Type Resource. Foreign Resources are subject to the fallback requirements defined inForeign Resources.
A resource that is located inside theEPUB Container.
Refer toPublication Resource Locations for media type specific rules for resource locations.
A list of allPublication Resources that constitute the givenRendition of aEPUB Publication.
Refer tomanifest[Packages 3.1] for more information.
An XML document that associates theXHTML Content Document with pre-recorded audio narration in order to provide a synchronized playback experience, as defined in[Media Overlays 3.1].
APublication Resource that describes oneRendition of anEPUB Publication, as defined inPackage Document[Packages 3.1]. The Package Document carries meta information about the Rendition, provides a manifest of resources and defines the default reading order.
A resource that contains content or instructions that contribute to the logic and rendering of at least oneRendition of anEPUB Publication. In the absence of this resource, the EPUB Publication might not render as intended by theAuthor. Examples of Publication Resources include a Rendition'sPackage Document,EPUB Content Document, CSS Style Sheets, audio, video, images, embedded fonts and scripts.
With the exception of the Package Document itself, the Publication Resources necessary to render a Rendition are listed in that Rendition'smanifest[Packages 3.1] and bundled in theEPUB Container file (unless specified otherwise inPublication Resource Locations).
Examples of resources that are not Publication Resources include those identified by the Package Documentlink[Packages 3.1] element and those identified in outbound hyperlinks that resolve toRemote Resources (e.g., referenced from thehref
attribute of an[HTML]a
element).
The Release Identifier allows any instance of anEPUB Publication to be compared against another to determine if they are identical, different versions, or unrelated.
Refer toRelease Identifier[Packages 3.1] for more information.
A resource that is located outside of theEPUB Container, typically, but not necessarily, online.
Refer toPublication Resource Locations for media type specific rules for resource locations.
One rendering of the content of anEPUB Publication, as expressed by anEPUB Package.
AnEPUB Content Document that includes scripting or anXHTML Content Document that contains[HTML]forms.
Refer toScripting[Content Docs 3.1] for more information.
An ordered list ofPublication Resources,typically EPUB Content Documents[Packages 3.1], representing the default reading order of the givenRendition of an EPUB Publication.
Refer tospine[Packages 3.1] for more information.
AnEPUB Content Document that conforms to the constraints expressed inSVG Content Documents[Content Docs 3.1].
The rendering of two adjacent pages simultaneously on a device screen.
The rendering of the textual content of anEPUB Publication as artificial human speech using a synthesized voice.
AnEPUB Content Document referenced from thespine, whether directly or via afallback chain[Packages 3.1].
The Unique Identifier is the primary identifier for anEPUB Publication, as identified by theunique-identifier
attribute[Packages 3.1]. The Unique Identifier can be shared by one or moreRenditions of the same EPUB Publication.
Significant revision, abridgement, etc. of the content requires a new Unique Identifier.
The region of anEPUB Reading System in which anEPUB Publication is rendered visually to a user.
AnEPUB Content Document that conforms to the profile of[HTML] defined inXHTML Content Documents[Content Docs 3.1].
XHTML Content Documents use theXHTML syntax defined in[HTML].
The keywordsMUST,MUST NOT,REQUIRED,SHALL,SHALL NOT,SHOULD,SHOULD NOT,RECOMMENDED,MAY, andOPTIONAL in this document are to be interpreted as described in[RFC2119].
All sections and appendixes of this specification are normative except where identified by the informative status label "This section is informative". The application of informative status to sections and appendixes applies to all child content and subsections they contain.
All examples in this specification are informative.
The EPUB 3.1 standard is modular in nature, with core features and functionality defined across a family of sub-specifications.
This specification represents the top-most specification in the family. It includes the conformance requirements for bothEPUB Publications (the product of the standard) andEPUB Reading Systems (the applications that consume EPUB Publications and present their content to users).
The other specifications that comprise EPUB 3.1 are as follows:
EPUB Packages 3.1[Packages 3.1] — defines requirements for eachRendition of the content.
EPUB Content Documents 3.1[Content Docs 3.1] — defines profiles of XHTML, SVG and CSS for use in the context of EPUB Publications.
EPUB Media Overlays 3.1[Media Overlays 3.1] — defines a format and a processing model for synchronization of text and audio.
EPUB Open Container Format (OCF) 3.1[OCF 3.1] — defines a file format and processing model for encapsulating a set of related resources into a single-file (ZIP)EPUB Container.
EPUB Accessibility[EPUB Accessibility] — defines accessibility conformance and discovery metadata requirements for EPUB Publications.
Alternate Style Tags[Alt Style Tags] — defines a pattern for tagging alternate style sheets using microformats.
These specifications represent the formal list recognized as belonging to EPUB 3.1, and that contain functionality referenced as part of the standard.
The IDPF has also developed a set of specifications that complement the core functionality of EPUB 3.1, but whose support in Reading Systems and use in authoring isOPTIONAL:
EPUB Canonical Fragment Identifiers[EPUB-CFI] — defines a standardized method for referencing arbitrary content within an EPUB Publication through the use of fragment identifiers.
EPUB Dictionaries and Glossaries[Dictionaries] — provides a framework for a rich user experience of dictionary publications.
EPUB Indexes[Indexes] — defines a consistent way of encoding the structure and content of indexes in EPUB Publications.
EPUB Multiple Renditions[Multiple Renditions] — defines the creation and rendering of EPUB Publications consisting of more than one Rendition.
EPUB Previews[Previews] — describes how preview content can be included in EPUB Publications.
EPUB Region-Based Navigation[Region Nav] — introduces conventions for region-based navigation through a visual rendition of an EPUB Publication based on regions of interest.
New functionality is also added periodically through the development of extension specifications. Features and functionality defined outside of core revisions to the standard, while not formally recognized in this specification, are nonetheless available for use byAuthors and Reading System developers (but are not stable until they reach the status ofRecommended Specifications).
This section is non-normative.
This section reviews the organization of the EPUB specifications through the central product they define: theEPUB Publication.
An EPUB Publication consists of one or moreRenditions of its content, each of which is represented by what is called anEPUB Package. An EPUB Package consists of all the resources needed to render the content. The key file among these is thePackage Document, which includes all the metadata used byReading Systems to present the EPUB Publication to the user (e.g., the title and author for display in a bookshelf, as well rendering metadata such as whether content has a fixed layout or can be reflowed). It also provides a complete manifest of resources, and includes aspine that lists the sequence to render documents in as a user progresses through the content.
An EPUB Package also include another key file called theEPUB Navigation Document. This document provides critical navigation capabilities, such as the table of contents, that allow users to quickly and easily navigate the content.
The requirements for EPUB Packages are defined in[Packages 3.1].
The EPUB Publication's resources are bundled for distribution in a ZIP-based archive with the file extension.epub
. As conformant ZIP archives, EPUB Publications can be unzipped by many software programs, simplifying both their production and consumption.
The container format not only provides a means of determining that the zipped content represents an EPUB Publication (themimetype
file), but also provides a universally-named directory of informative resources (/META-INF
). Key among these resources is thecontainer.xml
file, which directs Reading Systems to the available Package Documents.
The container format is defined in[OCF 3.1].
The structure and containment of an EPUB Publication is only one half of the format, the other half being the content that gets presented to users. This content is built on the Open Web Platform and comes in two flavours:XHTML andSVG. CalledEPUB Content Documents, these documents typically reference many additional resources required for their proper rendering, such as images, audio and video clips, scripts and style sheets.
Detailed information about the rules and requirements for the production of EPUB Content Documents is provided in[Content Docs 3.1], and accessibility requirements are defined in[EPUB Accessibility].
Media Overlay Documents complement EPUB Content Documents. They provide declarative markup for synchronizing the text in EPUB Content Documents with prerecorded audio. The result is the ability to create a read-aloud experience where text is highlighted as it is narrated. Media Overlay Documents are defined in[Media Overlays 3.1].
While conceptually simple, an EPUB Publication is more than just a collection of HTML pages and dependent assets in a ZIP package as presented here. Additional information about the primary features and functionality that EPUB Publications provide to enhance the reading experience is available from the referenced specifications, and a more general introduction to the features of EPUB 3.1 is provided in the informative[EPUB3 Overview].
AnEPUB PublicationMUST meet all of the following criteria:
ItMUST include one or moreEPUB Packages, each of whichMUST conform to the requirements defined in[Packages 3.1].
ItSHOULD conform to the accessibility requirements defined in[EPUB Accessibility].
AllPublication ResourcesMUST adhere to theconstraints for Core Media Types and Foreign Resources and be located as perPublication Resource Locations.
ItMUST be packaged in aEPUB Container as defined in[OCF 3.1].
AnEPUB Reading SystemMUST meet all of the following criteria:
ItMUST process theEPUB Container as defined in[OCF 3.1].
ItMUST processEPUB Packages as defined in[Packages 3.1].
ItMUST support allCore Media Type Resources.
ItMAY support an arbitrary set ofForeign Resource types, andMUST process fallbacks for unsupported Foreign Resources as defined inForeign Resources if not.
ItMUST processXHTML Content Document as defined inXHTML Content Documents — Reading System Conformance[Content Docs 3.1].
ItMUST processSVG Content Documents as defined inSVG Content Documents — Reading System Conformance[Content Docs 3.1].
If it has aViewport, itMUST support visual rendering ofXHTML Content Documents as defined inCSS Style Sheets — Reading System Conformance[Content Docs 3.1].
If it has a Viewport, itMUST support theimage Core Media Types[Core Media Types].
If it has the capability to render pre-recorded audio, itMUST support theaudio Core Media Types[Core Media Types] andSHOULD support Media Overlays[Media Overlays 3.1].
If it supportsText-to-Speech (TTS) rendering, itSHOULD supportPronunciation Lexicons[Content Docs 3.1],[CSS3 Speech] andSSML attributes[Content Docs 3.1] inXHTML Content Documents.
It is recommended that Reading Systems support at least one of the[H.264] and[VP8] video codecs, but this is not a conformance requirement – a Reading System might support other video codecs, or none at all. Authors and Reading System developers need to take into consideration factors such as breadth of adoption, video playback quality, and technology usage royalty requirements when making a choice to include or implement video in either format, or both.
ItSHOULD meet the accessibility requirements for Reading Systems in[EPUB Accessibility].
ItMUST attempt to process an EPUB Publication whose version is lower than "3.1
".
EPUB Publications with older version numbers will not always render exactly as intended unless processed according to their respective specifications. Reading SystemsSHOULD support such EPUB Publications as defined by those specifications.
ItSHOULD attempt to process any given Rendition of an EPUB Publication whose Package Documentversion
attribute designates a version higher than "3.1
".
ItMUST be aconformant non-validating processor[XML].
ItMUST be aconformant processor as defined in[XMLNS].
A conforming Reading System is not necessarily a single dedicated program or device, but might exist as a distributed system.
EachRendition of anEPUB Publication typically consists of manyPublication Resources. These resources are divided into two categories: those thatEPUB Reading Systems have to support (Core Media Type Resources) and those that they do not (Foreign Resources).
Authors are free to use both types of resources to construct their EPUB Publications, but need to be aware that some Reading Systems might not render the Foreign Resources they use.
As EPUB Publications are designed to be fully consumable on any compliant Reading System, a system of fallbacks is therefore necessary to ensure that the use of Foreign Resources does not impact on the ability of the user to consume the content. This section lays out theset of Core Media Types that are supported across Reading Systems and identifiesfallback mechanisms that can be used to satisfy the consumability requirement.
Publication Resources that conform to a Core Media Type specification areCore Media Type Resources and can be included in an EPUB Publication without fallbacks.
Refer to[Core Media Types] for the current list ofCore Media Types.
Foreign ResourcesMAY be included in an EPUB Publication without a fallback provided they are not referenced fromspineitemref
elements[Packages 3.1] or directly rendered in their native format in EPUB Content Documents (e.g., via[HTML]embedded content and[SVG]image
andforeignObject
elements).
When aForeign Resource is included in the spine or directly rendered in its native format in an EPUB Content Document, a Core Media Type fallbackMUST be included. Fallbacks take one of the two following forms:
intrinsic fallback mechanisms provided by the format (e.g., ability to provide more than one media type or to display an alternate embedded message when a media type cannot be rendered). Refer to the[HTML] and[SVG] specifications for the intrinsic fallback capabilities their elements provide.
manifest fallbacks[Packages 3.1] are a feature of thePackage Document that create a fallback chain to a Core Media Type Resources. They are used to create fallbacks for Foreign Resources in thespine[Packages 3.1] and when intrinsic fallback capabilities are not available (e.g., for the[HTML]img
element).
AllPublication ResourcesMUST be located in theEPUB Container, with the following exceptions:
Audio resources[Core Media Types]MAY be located outside the EPUB Container.
Video resourcesMAY be located outside the EPUB Container.
Resources retrieved by scriptsMAY be located outside the EPUB Container, but the[HTML] and[SVG]script
elementsMUST NOT referenceRemote Resources to ensure availability at runtime (i.e., from theirsrc
orhref
attributes, respectively).
Font resourcesMAY be located outside the EPUB Container.
The following example shows a reference to an audio file in anXHTML Content Document that is located inside the EPUB Container.
<audiosrc="audio/ch01.mp4"controls="controls"/>
The following example shows a reference to an audio file in an XHTML Content Document that is located outside the EPUB Container.
<audiosrc="http://www.example.com/book/audio/ch01.mp4"controls="controls"/>
Authors are encouraged to locate audio, video and script resources inside the EPUB Container whenever feasible to allow users access to the entire presentation regardless of connectivity status.
The above rules for Publication Resource locations apply regardless of whether the given resource is aCore Media Type Resource or aForeign Resource.
The inclusion ofRemote Resources in anEPUB Publication is indicated via theremote-resources property[Manifest Vocab] on themanifestitem
element[Packages 3.1].
AnyPublication Resource that is an XML-Based Media TypeMUST meet the following constraints:
ItMUST be a conformant XML 1.0 Document as defined inConformance of Documents[XMLNS].
External identifiersMUST NOT appear in the document type declaration[XML].
The above constraints apply regardless of whether the given Publication Resource is aCore Media Type Resource or aForeign Resource.
Features defined in this specification and its siblings are occasionally removed if they are no longer needed or have been replaced by another feature. Prior to removal, the features are marked asdeprecated orsuperseded as an early warning to the EPUB community. A deprecated feature is one that is in the process of being removed from the current version of the specification, while a superseded feature is one that is being retained only for authoring content compatible with an older version.
If a feature is marked asdeprecated, the following hold true:
The feature will be removed in a future version of the specification. The feature is marked as deprecated in order to giveAuthors andEPUB Reading System developers time to prepare for removal.
It is stronglyRECOMMENDED that Authors discontinue use of the feature in theirEPUB Publications.
Reading SystemsMUST continue to support the feature as it is defined until it is formally removed.
Validation toolsMUST alert Authors that inclusion of the feature is deprecated when encountered in an EPUB Publication. It isRECOMMENDED that the alert be lower in severity than an error or warning.
If a feature is marked assuperseded, the following hold true:
The superseded featureMAY be removed in a future version of the specification, but there is no definite timeline for removal.
AuthorsMAY include the superseded feature for compatibility with older versions of the specification.
Reading SystemsMUST NOT support the superseded feature in content that conforms to the current version of the specification.
Validation toolsMUST NOT alert Authors about the presence of the superseded feature in an EPUB Publication, as it is valid for backwards compatibility. Validation toolsMUST alert Authors if the superseded feature is not conformant to its definition or otherwise breaks a usage requirement.
A feature that is superseded and marked for removal differs from asuperseded feature in the following ways:
The feature will be removed in a future version of the specification.
Validation toolsMUST alert Authors about the presence of superseded features that are marked for removal. It isRECOMMENDED that the alert be given the same severity asdeprecated features.
This section is non-normative.
This index identifies where key concepts are defined in EPUB 3.1, including element, attribute and property definitions.
content dimensions[Content Docs 3.1]
SVG initial containing block (viewBox)
XHTML initial containing block (viewport meta)
Media Overlays Documents[Media Overlays 3.1]
semantic inflection (epub:type)
OCF abstract container[OCF 3.1]
media type identification (mimetype)
obfuscation (was font obfuscation)
Package Document[Packages 3.1]
fixed layout properties — see alsofixed layouts
dcterms:modified property (last modified date)
contexts (container-constrained and spine-level)
XHTML Content Documents[Content Docs 3.1]
discouraged constructs (rp
andembed
)
RDFa and microdata (semantic enrichment)
This section is non-normative.
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 included:
For more detailed acknowledgements and information about contributors to each version of EPUB, refer toAcknowledgements and Contributors[EPUB3 Overview].