Formatting Kindle and Mobi Ebooks

Dr. George Benthien

Preface

The Kindle has become a very popular device for reading ebooks. One of the reasons there are so many ebooks for the Kindle is that Amazon has made it possible for authors to self publish. The document format that Amazon favors for conversion to an ebook is HTML, the language of the web. There are ways to automatically convert Microsoft Word documents or Adobe PDF documents into HTML, but the results are not always what is desired. In this article I will show you how to write directly in HTML and how to convert your document into an ebook readable by the Kindle. This will be done in a manner that takes advantage of all the nice navigational features of the Kindle.

The Kindle only supports a limited subset of HTML. This is good for the beginner since there is much less to learn. For those familiar with HTML it will be necessary to learn which HTML tags are supported and how some of the defaults are different than those employed by the web. The Kindle also supports a limited subset of CSS (Cascading Style Sheets). I will discuss the basics of HTML and CSS as used by the Kindle. I will also show how to build a table of contents which is an essential navigational aid on the Kindle. There are two other files that will be needed—an OPF file and a NCX file. These files allow you to use multiple HTML files for your document and also set up some key navigational features. I have included annotated examples of these files. I conclude with a discussion of the conversion program Kindlegen that is available for free from Amazon. This is the only conversion program that is guaranteed to be compatible with present and future versions of the Kindle.