English | Help | Sign in

Please rate your experience using this page




Thank you! We appreciate your feedback.

Click here to take our survey and give us detailed feedback. If you're having a problem and need assistance, please contact us.

Help Topics

Contact Us

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

Contact Us

Create a Table of Contents with a Navigation Document

You can create two types of Table of Contents (TOC) for a Kindle book: a Logical TOC and an HTML TOC.

TOC TypeRequired?Where FoundWhy it Matters
Logical TOCRequired for all Kindle books by AmazonAccessible from the Kindle Go To menu

Lets the reader easily find parts, sections, and chapters of your book from the Kindle Go To menu

Lets the reader see how far along they are in the book

HTML TOCStrongly Recommended by AmazonAppears as a page in the beginning of the book

Users expect to see an HTML TOC at the beginning of a book

Some older devices don’t support a logical TOC, so an HTML TOC lets readers on all devices find parts of your book easily

1. Build a Logical TOC Using a Navigation Document

We recommend using a navigation document to make a logical TOC, which provides the best customer experience on newer devices. This type of TOC can also serve as an HTML TOC, which older devices depend on for navigation. If you're more experienced with coding, you can also create a logical TOC with NCX, but these steps will show you how to use the navigation document method.

  1. In your HTML editor, create an HTML or XHTML file. Name it toc.html or toc.xhtml.*
  2. Assign an epub:type attribute with the value "toc" in a <nav> element to identify it as a Table of Contents (sample code below).
  3. Create an ordered list of hyperlinks leading to each chapter and section. Ordered lists can be nested to create a hierarchy of levels.

Free HTML editing tools can be found here:
Important: Do not nest anchor tags in fixed-layout books. Fixed-layout books with nested anchor tags cannot be supported and will be suppressed.

Warning: Unnecessary or confusing hyperlinks, misplaced Tables of Contents (TOCs), or the addition of disruptive content that takes readers away from the main content of your book can result in a poor customer experience. If the formatting of a book results in a poor experience or genuine reader confusion, or is designed to unnaturally inflate sales or pages read, we will take action to remove titles and protect readers.

Sample code:

<nav epub:type="toc">
<li><a href=”Sway_body.html#preface_1">AUTHOR'S NOTE</a></li>
<li><a href=”Sway_body.html#part_1">PART ONE</a>
<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>

This sample produces a TOC that looks like this: 


THE EMPRESS, 1928–1947

2. Use Your TOC as an HTML TOC (Recommended)

For customers on older devices, this saves many clicks when they want to jump to a part of your book.
  1. Activate a guide item in the Kindle Go To menu to make a link to the HTML TOC accessible from anywhere in the book. To do this, reference your TOC in the navigation document with a landmarks nav element (sample code below).
  2. In the epub:type attribute, set "landmarks" as the value.
  3. In the epub:type attribute, add a link with "toc" as the value.

Sample code

<nav epub:type="landmarks">

<ol><li><a epub:type="toc" href="table-of-contents.xhtml">Table of Contents</a></li></ol>  


Tip(Optional): To add the Table of Contents guide item without adding extra text to your TOC, include this attribute: hidden="hidden" in your landmarks nav element.

Sample code with "hidden" attribute

<nav epub:type="landmarks" class="hidden-tag" hidden="hidden">

<ol class="none" epub:type="list">

<li><a epub:type="toc" href="table-of-contents.xhtml">Table of Contents</a></li></ol> 


3. Finish Your TOC

  1. Save your navigation document
  2. Open your OPF file for editing
  3. Declare your navigation document in the <manifest> section of the OPF file with "nav" as the value of the properties attribute. This identifies it for the device as the source of the logical TOC.

    Sample OPF file manifest code


    <item id="table-of-contents" properties="nav" href="xhtml/table-of-contents.xhtml" media-type="application/xhtml+xml"/>

  4. To use the navigation document as an HTML TOC, enter it in the <spine> section of the OPF where you would like it to appear in the flow of your content. Including it in the flow of your content will provide easy navigation for customers on devices without chapter-to-chapter navigation in the Kindle Go To menu.

    Tip: To avoid interrupting the customer’s reading progress, we recommend placing it at the front of the book.

    Sample OPF file HTML TOC code

<itemref idref="table-of-contents"/>

4. Quality Check

Your TOC is now finished, offering a rich navigation experience for customers. Please perform a quality check by checking the items below:

  1. All TOC entries in the Table of Contents are clickable and lead to the correct locations
  2. Every chapter and section has a TOC entry
  3. All chapter and section names in the TOC match the names in the book
  4. No typographical errors
  5. No duplicates in the TOC
  6. No TOC entries that lead to the same location

Common Fixes

Q: Why is the button for Table of Contents grayed out in the Go To menu?
A: Make sure the link to the navigation document (e.g., toc.xhtml) in the landmarks nav element also contains epub:type="toc" to identify it for the device as the Table of Contents.

Q: I am following the IDPF 2 specification, but my Table of Contents is grayed out in the Go To menu. Why?
A: If you include a TOC guide item in the <guide> section of the OPF, the landmarks nav element in the navigation document must have the epub:type="toc" element. Be sure the navigation document has a landmarks nav element that includes epub:type="toc" in addition to the reference  in the <guide> section of the OPF (per the IDPF 2 spec).

Q: Why doesn’t my Table of Contents appear inside my book?
A: The Table of Contents will only appear in the flow of your book if the navigation document is listed in the <spine> section of the OPF document.

Q: Why doesn’t my Table of Contents appear in the Go To menu?
A: A list of chapters will only appear in the Go To menu on devices that support a logical TOC. Make sure the navigation document is identified with properties="nav" in the <manifest> section of the OPF so that the device knows you intend to use it as the logical TOC.

Q: What if I already have an NCX TOC?
A: Navigational Control File from XML (NCX) is still supported as a source for logical TOC on Kindle, but the device will prefer the navigation document if it exists.

Q: What if I already have an NCX TOC, but the logical TOC on Kindle is not working (or not working as expected)?
A: We strongly recommend adding a logical TOC using a navigation document. However, you're welcome to read the instructions on how to create an NCX TOC.

Tip: Professional formatting and conversion services are available to prepare your book for print and Kindle.

We're Sorry.
The service or feature you're trying to use is currently unavailable. We're working to solve the problem as quickly as possible. Please try again later.
Your session has expired

Please sign in again.

Sign In
Adobe Flash

To view this page, you'll need Adobe Flash Player.

If you have already installed it, please make sure it is up to date and enabled.

Get the latest version of Adobe Flash Player