If you’re publishing on Kindle, chances are you want your book to look its very best. But that often requires a task not performed by most Kindle authors—namely, refining the HTML you submit.
Many authors follow Amazon’s recommended approach to create their Kindle book: Compose in Microsoft Word, export to HTML—the language of ebooks and the Web—then submit to Amazon KDP. It’s an approach I discuss in detail in my book From Word to Kindle. Other authors use similar methods with other word processors.
Done correctly, formatting in a word processor like Word can bring you maybe 80% of the way to a well-formatted ebook. But if you want your book to look as good as it can, there’s that other 20% to worry about. Now, perfection is not really possible on the Kindle, given the quirks, bugs, and limitations of the platform itself. But you can come closer—if you’re willing to tinker with HTML.
Does that idea scare you? It doesn’t need to. You don’t have to read that language (though it certainly won’t hurt if you do want to learn). All you need is to be able to recognize small bits of code I’ll point out to you, and shift them or replace them with other bits. And all these changes can be done with find-and-replace operations. In fact, if you set up a master macro as I recommend, the whole job can be finished in seconds.
Here are some of the things you can accomplish through changes in HTML.
• Adjust bookmarks so headings retain proper formatting when jumped to.
• Remove settings that stop the user from choosing their own.
• Keep fonts from appearing much too small or much too large when the book is opened.
• Make sure indents and other spacing stays relative to larger and smaller font sizes.
• Avoid line breaks that leave short words dangling at the ends of lines or paragraphs.
• Make up for features lost in translation from your word processor, like nonbreaking hyphens.
• Stop “ghost hyphens” from appearing in the middle of words.
• Keep pages of text from disappearing for some users.
• Prevent the Kindle from applying its own defaults in place of your settings.
Since Word is the most common tool for generating HTML for Kindle, I’ll focus mostly on Word’s exported code, making this book a perfect companion to my earlier one. But if you’re using a different word processor or a dedicated ebook tool—or even if you’re writing HTML directly—the general principles I provide should still help. In fact, I’ll provide some tips on Kindle formatting with HTML that you won’t find even in books dedicated to that approach.