Electronic books (eBooks) are rapidly surpassing printed books in sales volume. Besides being cheaper and easier to obtain, they are also simpler to publish. Most authors prepare their manuscript in a word processor such as Microsoft Word and then use a conversion program to put it in the desired electronic format. While this often works it usually doesn't produce nicely formatted eBooks. I will show you how, with a little effort, you can control the format of your eBook.
The two major eBook formats are the MOBI format (used by Amazon) and the EPUB format used by most other eBooks. Both the MOBI and EPUB formats are based on HTML, the language used by web pages. Therefore, it makes sense to submit your document in HTML format instead of relying on some conversion program. The original MOBI format only supported a limited subset of HTML. In 2011 Amazon introduced a newer format (KF8) that is used in the Kindle Fire as well as the newer Kindle readers. The newer MOBI files contain an eBook in both the older MOBI format and the KF8 format.
EPUB and KF8 have broader support for HTML than the older MOBI format. For the most part we will restrict ourselves to the limited subset of HTML supported by the older Kindles. This is not a serious limitation since most documents only require a few common HTML tags. It is also 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 MOBI format also supports a subset of CSS (Cascading Style Sheets). CSS styles give the user more control over the display of text and images. I will discuss the basics of HTML and CSS as used by the Kindle MOBI format (and also EPUB).
We will use the following approach to constructing an eBook:
- Prepare your document(s) in Microsoft Word.
- Copy the text into a text editor such as notepad++ (free), removing the Word formatting in the process.
- Add necessary HTML tags to the text document(s).
- Prepare a CSS style file to add desired visual effects.
- Prepare organizational and navigation files required by EPUB.
- Zip (compress) the EPUB files into an EPUB document.
- Validate EPUB document.
- Convert EPUB document into a MOBI document using Amazon's free Kindlegen program or Kindle Previewer.
If you are familiar with HTML, then you can skip the first three steps and write your document(s) directly in a text editor — adding HTML tags as you go.