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

HTML and CSS Guidelines

See a list of supported HTML elements. See a list of supported CSS elements. See a list of attributes and tags supported by Enhanced Typesetting.

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 resources as a primer on constructing well-formed HTML documents:

To ensure your HTML or XHTML documents are well formatted for accessibility, we recommend they adhere to the following document accessibility standards:

Negative Values

Avoid using negative values for positioning text and margins. Positioning with negative values without adding padding for compensation can cause content to display with the edge cut off. For example, if you want to use text-indent: -2em you also need to apply padding-left: 2em.


Scripting isn't supported. All scripts are stripped from the source during conversion.

Nested <p> Tags

In compliance with W3C standards, avoid nested <p> tags. Files with nested <p> tags do not convert properly.

File References: Case and Spelling of Source

Per W3C HTML standards, all file references (fonts, images, etc.) must match the case and spelling of the name of the source file exactly. (Example: "audiovideo/ThisFile.mp4" is different from "audiovideo/Thisfile.mp4".) To indicate a file in a directory, use "/" characters and not "\" characters. (Example: "multimedia/ThisFile.mp4" is valid, but "multimedia\ThisFile.mp4" is not.)

Support for Other Encodings

The source of a Kindle book can be encoded in many different ways. All encodings are supported, provided that:

  • The encoding of the HTML files is clearly stated in the HTML.
  • The computer used for compiling the sources supports the encoding and knows how to convert it to Unicode.

Amazon recommends specifying the encoding of the HTML by using the <meta> tag in the <head> section or an XML declaration.

Method 1:



<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Method 2:

<?xml version="1.0" encoding="UTF-8"?>

Supported Characters and Spaces

Characters should be represented using plain text UTF-8 characters, except where XML entities are strictly required or are easier for humans to read than their character equivalents. For example, instead of using the "&copy;" entity, use the © character.

XML entities are strictly required for "<" (&lt;), ">" (&gt;), and "&" (&amp;).

The only supported spaces are the normal space, the non-breaking space (&nbsp;), and the zero-width non-joiner (&zwnj;). Use of any other space can break the selection, dictionary lookup, and line-wrap algorithms.

Do not use Unicode format characters, as they may cause problems.

Design for a Good eBook Experience

Kindle supports float via CSS, except within tables, but this does not guarantee that the floating of text and images will produce an exact replica of the print layout on all Kindle devices and applications. If float is not producing the desired result, Amazon recommends rethinking the design and layout to create the best possible eBook experience rather than fixating on duplicating the print experience on a device. Using fixed-layout format just to replicate print layout is not allowed in Kindle books because customers report this as a bad user experience.

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

Please sign in to continue

Sign In