EPUB 3 Specification: See the Package document.
The package document contains information about the book including the metadata, manifest, and spine. It also defines what version of EPUB you are using. For EPUB 3 books, the version must be 3.0.
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0">
EPUB 3 Specification: See the Metadata section.
You can include as much metadata as pertains to your book. But at minimum, you must include the following items:
Title
ID
Language
Modified-date (date your book was last modified)
<metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Flowing Book</dc:title>
<dc:identifier id="bookid">1234567890</dc:identifier>
<dc:language>en</dc:language>
<meta property="dcterms:modified">2023-06-01T01:00:00Z</meta>
</metadata>
EPUB 3 Specification: See the Manifest section.
The <manifest>
is a listing of every file that is used to create your book, for example, all content documents, CSS, fonts, and images. Use the properties
attribute to identify the navigation document and the cover image of the book.
<manifest>
<item id="cov" href="cover.xhtml" media-type=“application/xhtml+xml"/>
<item id="tit" href="titlepage.xhtml" media-type="application/xhtml+xml"/>
<item id="ch1" href="chapter1.xhtml" media-type="application/xhtml+xml"/>
<item id="ch2" href="chapter2.xhtml" media-type=“application/xhtml+xml"/>
<item id="end" href="endnotes.xhtml" media-type="application/xhtml+xml"/>
<item id="bib" href="bibliography.xhtml" media-type="application/xhtml+xml"/>
<item id="cht" href="chart.xhtml" media-type=“application/xhtml+xml"/>
<item id="css1" href="stylesheet.css" media-type="text/css"/>
<item id="font" href="fonts/font.ttf" media-type="application/x-font-ttf"/>
<item id="toc" href="toc.xhtml" media-type="application/xhtml+xml" properties="nav"/>
<item id="img1" href="cover-img.jpg" media-type="image/jpeg" properties="cover-image"/>
</manifest>
EPUB 3 Specification: See the Spine section.
The <spine>
is a list that defines the linear reading order of the content documents of the book. The first item in the list is the first item in the book.
<spine>
<itemref idref="cov"/>
<itemref idref="tit"/>
<itemref idref="ch1"/>
<itemref idref="ch2"/>
<itemref idref="end" linear="no"/>
<itemref idref="bib"/>
<itemref idref="cht" linear="no"/>
</spine>
Nonlinear content (linear="no"
) includes documents that supplement the main content, but are outside the reading flow of the book. For example, nonlinear content can be charts, tables, and review answers. See Nonlinear Content.