English | Help | Sign in | Give Feedback

How would you rate your experience using this page?

Visit our help center for resources to common issues

Click here to take our survey and give us detailed feedback.

Thank you for your feedback.

Click here to take our survey and give us detailed feedback.

Help Topics

Contact Us

Have feedback? Can't find your answer in our Help pages?

Contact Us

Navigation Guidelines

To make a full use of Kindle apps navigation functionality, it is required to create a complete NCX file in a content file. The NCX file is mirrored to TOC in the menu of the apps and the TOC is shown in any pages, while the HTML TOC is shown as page(s) in a book. The HTML TOC has a location and to get to the TOC readers need to go to that location. 


HTML Table of Contents Guidelines

 
Place the HTML table of contents (ToC) toward the beginning of the book and not at the end of the book. This ensures that a customer paging through the book from the beginning encounters the ToC naturally. Incorrect placement of the ToC affects the accuracy of the "Last Page Read" feature. Correct placement ensures that the ToC appears in sample downloads of the book.

HTML ToC best practices:

  • The entries in the ToC must be HTML links so that users can click to go to a specific location. A table of contents that is not made of links is not useful on Kindle.
  • Do not create a ToC using HTML <table> tags. Tables are for tabular data only, not for layout.
  • Do not use page numbers in the ToC. Kindle books do not always map directly to page numbers in physical editions of the book.
  • If you are importing the document from Word, use the "Heading" styles and the "Table of Contents" feature of Microsoft Word. The ToC created by Word will be imported correctly and will convert to a ToC that follows these guidelines.
  • For bundled editions containing more than one individual book, include an overarching ToC at the beginning of the file.
  • If your ToC includes a List of Maps or Illustrations, provide an HTML link to each map or illustration.

Using a Nested HTML ToC

To create useful and navigable nested ToC entries, Amazon recommends using the following syntax in the HTML ToC. The examples below show two ways of writing the same sample code: style attributes and CSS classes.

Using style attributes:

<div>Section 1</div>

<div style="margin-left:2%;">Chapter 1</div>

<div style="margin-left:2%;">Chapter 2</div>

<div style="margin-left:2%;">Chapter 3</div>

<div style="margin-left:4%;">Subchapter 1</div>

<div style="margin-left:4%;">Subchapter 2</div>

<div style="margin-left:2%;">Chapter 4</div>

<div style="margin-left:4%;">Subchapter 1</div>

<div>Section 2</div>
...

Using CSS classes:

<style>
div.chapter { margin-left: 1em}
div.subchapter { margin-left: 2em}

</style>

<div>Section 1</div>

<div class="chapter">Chapter 1</div>

<div class="chapter">Chapter 2</div>

<div class="chapter">Chapter 3</div>

<div class="subchapter">Subchapter 1</div>

<div class="subchapter">Subchapter 2</div>

<div class="chapter">Chapter 4</div>

<div class="subchapter">Subchapter 1</div>

<div>Section 2</div>
...



NCX Guidelines

Logical ToCs are generated using toc nav elements or a navigational control file for XML application (NCX). Creating a logical ToC exposes the hierarchical structure of a Kindle book and allows the user to navigate through it using the Kindle menu. The inclusion of a logical ToC is especially important for books that are longer than 20 pages.

In logical ToC-enabled books, users can see where they are in the book because the part, chapter, or section is exposed. This progress indicator also shows relative progress through the book.

See guidance on creating a logical ToC using a toc nav element.

See guidance on creating a logical ToC using NCX.

Important: Kindle devices and applications support two levels of nesting.

Creating a Logical ToC Using a toc nav Element

See details on the toc nav element (IDPF 3.0 specification).

Creating a toc nav element provides both a logical ToC and an HTML ToC. The toc nav element should be a separate HTML document from the HTML ToC.

Example:

<nav epub:type="toc">

<ol>

<li><a href="Sway_body.html#preface_1">AUTHOR'S NOTE</a></li>

<li><a href="Sway_body.html#part_1">PART ONE</a>

   <ol>

   <li><a href="Sway_body.html#chapter_1">THE HOUSES, 1969</a></li>

   <li><a href="Sway_body.html#chapter_2">ROCK AND ROLL, 1962</a></li>

   <li><a href="Sway_body.html#chapter_3">THE EMPRESS, 1928–1947</a></li>

    </ol>

</li>

</ol>

</nav>

The example above defines the following ToC hierarchy:

AUTHOR'S NOTE

PART ONE

   THE HOUSES, 1969

   ROCK AND ROLL, 1962

   THE EMPRESS, 1928–1947

This excerpt from the OPF (publication header file) shows how to declare the toc nav element in the <manifest>:

Example:

<manifest>

<item id="toc" properties="nav" href="xhtml/toc.xhtml" mediatype="application/xhtml+xml"/>

Using it in the <spine> is optional if it will be used as the HTML ToC.

Example:

<spine>

<itemref idref="toc"/>

Creating a Logical ToC Using NCX

See IDPF 2.0 specifications for NCX.

NCX Example:

<navMap>

<navPoint class="titlepage" id="L1T" playOrder="1">

<navLabel><text>AUTHOR'S NOTE</text></navLabel>

<content src="Sway_body.html#preface_1" />

</navPoint>

<navPoint class="book" id="level1-book1" playOrder="2">

<navLabel><text>PART ONE</text></navLabel>

<content src="Sway_body.html#part_1" />

<navPoint class="chapter" id="level2-book1chap01" playOrder="3">

<navLabel><text>THE HOUSES, 1969</text></navLabel>

<content src="Sway_body.html#chapter_1" />

</navPoint>

<navPoint class="chapter" id="level2-book1chap02" playOrder="4">

<navLabel><text>ROCK AND ROLL, 1962</text></navLabel>

<content src="Sway_body.html#chapter_2" />

</navPoint>

<navPoint class="chapter" id="level2-book1chap03" playOrder="5">

<navLabel><text>THE EMPRESS, 1928–1947</text></navLabel>

<content src="Sway_body.html#chapter_3" />

</navPoint>

</navPoint>

</navMap>

The NCX example above defines the following ToC hierarchy:

AUTHOR'S NOTE

PART ONE

   THE HOUSES, 1969

   ROCK AND ROLL, 1962

   THE EMPRESS, 1928–1947

Amazon requires that the NCX elements follow the same order as the book. (For example, the link for Chapter 2 should not precede the link for Chapter 1.) This excerpt from the OPF (publication header file) shows how to add an NCX table of contents to a book.

Declare the NCX in the <manifest>:

<manifest>

<item id="toc" media-type="application/x-dtbncx+xml"
   href="toc.ncx"/>

And reference it in the <spine>:

<spine toc="toc">



Guide Items

Guide items are an optional feature in the EPUB format but are highly recommended. Kindle provides support for the cover, ToC, and start reading location ("Go to Beginning") guide items. You can define guide items for the cover and ToC as described in the following section, Defining Cover and ToC. The start reading location is defined by Amazon. If you choose not to include guide items for the cover and ToC, these list items will still appear in the Kindle menus, but will be grayed out and not selectable.


Defining Cover and ToC

Kindle supports both landmarks nav elements and guide items for defining the cover and table of contents (ToC). These elements serve to supplement the ToC and should not be used in place of one.

The landmarks nav elements are part of the IDPF 3.0 specification and are described at: http://idpf.org/epub/30/spec/epub30-contentdocs-20111011.html#sec-xhtml-nav-def-model and http://idpf.org/epub/30/spec/epub30-contentdocs-20111011.html#sec-xhtml-nav-def-types-landmarks.

Here is an example of a guide item for a ToC (underlined elements are mandatory):

<guide> <reference type="toc" title="Table of Contents" href="toc.html"/> </guide>

Here is an example of a landmarks nav element for a ToC (underlined elements are mandatory):

<nav epub:type="landmarks">

<ol><li><a epub:type="toc" href="toc.html">Table of Contents</a></li></ol>
</nav>


An unexpected error occurred. Please try again later.
Your session has expired

Please sign in to continue

Sign In
edit