Skip to content
Tingle Press

in Production

What EPUB 3 is, in plain terms

EPUB 3 is the standard format behind most ebooks. Under the name, it is familiar technology: web pages in a zip file, with rules.

Most ebooks are distributed as EPUB files or converted from them. EPUB 3 is the current version of the format. It sounds technical, and in detail it is, but the basic idea is straightforward.

A website in a box

An EPUB file is a zip archive with a particular structure and its own file extension. Rename a copy of one to end in .zip and it can usually be opened like any other archive to see what is inside.

Inside are the same technologies used to build websites. The text of the book is written in XHTML, a strict form of HTML. The styling, such as fonts, spacing and alignment, is written in CSS. Images are ordinary image files such as JPEG, PNG or SVG. Fonts can be included, subject to their licences.

Around those sit a few files that describe the book to a reading system. A package document lists every file in the book, records metadata such as the title, author, language and identifier, and sets the reading order. A navigation document provides the table of contents. A small file called mimetype, and a folder called META-INF containing a container file, tell the reading system what kind of file this is and where to find the package document.

EPUB 3 is maintained by the W3C, the body that develops standards for the web.

Reflowable and fixed layout

Most EPUBs are reflowable. The text has no fixed pages; the reading system lays it out to fit the screen and the reader's settings, such as font and text size. This suits novels and other text-led books.

EPUB 3 also supports fixed-layout books, in which each page is set out exactly, much like a PDF. These suit picture books, comics and heavily designed books where the layout is part of the content.

What EPUB 3 added

EPUB 3 replaced the older EPUB 2. It is based on HTML5 and modern CSS, which allows richer structure and styling. It added better support for languages written right to left or vertically, native support for fixed layouts, and features such as embedded audio and video and synchronised text and narration, though not every reading system supports every feature.

It also supports accessibility well. A properly structured EPUB 3 file can be read aloud by a screen reader and navigated by its headings, and its images can carry text descriptions. Accessibility metadata lets a book declare which of these features it offers. For many publishers accessibility has become a requirement rather than an extra, driven by readers and, in some markets, by law.

Why it matters to authors and publishers

A well-made EPUB is a well-structured document. Headings are real headings, paragraphs are real paragraphs, and the table of contents links to the right places. That structure is what lets the text reflow cleanly, a reader change the font, a screen reader make sense of the book and a retailer process the file.

EPUBs exported straight from a word processor or from print layout software can work, but they often carry messy code, unnecessary styling and missing structure. The result may look fine in one reading app and break in another.

Most major ebook retailers accept EPUB. Some convert it to their own formats for delivery to readers, but the EPUB remains the master file the publisher supplies and maintains.

Before an EPUB is sent anywhere, it should be validated. That is a subject of its own.