User`s guide
Publishing on Kindle: Guidelines for Publishers
Styling Guidelines 3.9
3.9.1 Styling Guideline #1: Use a Nested HTML TOC
To create useful, navigable, deep 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:1em;">Chapter 1</div>
<div style="margin-left:1em;">Chapter 2</div>
<div style="margin-left:1em;">Chapter 3</div>
<div style="margin-left:2em;">Subchapter 1</div>
<div style="margin-left:2em;">Subchapter 2</div>
<div style="margin-left:1em;">Chapter 4</div>
<div style="margin-left:2em;">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>
3.9.2 Styling Guideline #2: Format Sidebars Correctly
When inserting sidebar content into the main flow of a book formatted for Kindle Format 8, use float via
CSS. However, if the book is formatted for Mobi 7, use the <hr/> HTML tags before and after the sidebar
to differentiate it from the main body of text. Avoid using negative em values when specifying dimensions
for a float element.
HTML Guidelines 3.10
3.10.1 HTML Guideline #1: Constructing Well-Formed HTML Documents (XHTML)
Kindle Format 8 supports most HTML 5.0 features, although the following HTML features are not fully
supported: forms, frames, and JavaScript.
When creating source HTML or XHTML for the Kindle, refer to one of the following books as a primer on
constructing well-formed HTML documents:
HTML, XHTML, and CSS by Elizabeth Castro (published by Peachpit Press):
http://www.amazon.com/HTML-XHTML-and-CSS/dp/B000SEFC5Q
Beginning HTML with CSS and XHTML: Modern Guide and Reference by David Schultz and Craig Cook
(published by Apress):
http://www.amazon.com/Beginning-HTML-CSS-XHTML-
Reference/dp/B001D25ZPE
Kindle Publishing Guidelines Amazon.com 31










