HTML is the language e-books are written in. Any file you send to Amazon Kindle Direct Publishing, no matter what the format, eventually gets converted to HTML at some point. Thus, to have complete control over the formatting of your book, HTML is the language to use.
HTML is easy and simple if you do it yourself. This book has many examples, starting with the simplest book that just says, "Hello world!" It gives examples showing how to make spans of text italic, bold, underlined, strikethrough, how to make text large or small, select a monospace font, designate paragraphs, add a chapter title, make the title large, and center the title.
We'll build up our repertoire of concepts and skills, one step at a time, as we slowly and gently grow our book. We will finish with a book in the Open Publication Format (OPF), which is the input format for Amazon's KindleGen program. We also cover the NCX navigation file that allows the user to easily navigate your book.
We will format our text so that it looks nice on all Kindles, both the older black and white Kindles, and the newer color Kindles. Then, after we've finished formatting our book for Kindle, we'll be in a position where with just a few modifications we can convert our book to the EPUB format and publish it for the Barnes & Noble Nook e-reader and other non-Kindle e-readers which use the EPUB format.
This book includes a very comprehensive and in-depth examination of the Kindle file format, including a complete byte by byte internal examination of a sample Kindle file (chapter 20).
This book is for people who have at least a modicum of technical ability, and are bright enough to understand something once it's clearly and correctly explained. You don't have to know HTML, and you don't have to be a computer programmer. If you know the basics of using a computer, and just need someone to clear up all this confusion and explain, in a simple and easy to understand way, how to properly format your Kindle book and get it ready for publishing, then this is the book for you.
Author(s): David Deley
Publisher: David W. Deley
Year: 2013
SECTION I: PRELIMINARIES
CHAPTER 1: Introduction
Amazon’s Erroneous Documentation
Kindle Bugs
Problems Authors and Publishers Are Having
Why HTML?
Microsoft Word is for Paper
Non-Kindle E-readers
The World is Deprecated
Who This Book Is For
Topics This Book Does Not Cover
Outline
Just the Facts, Ma’am
Methodology
Many Examples
Repetition
CHAPTER 2: Computer Operating Systems
Microsoft Windows
Apple Mac
Linux
Haiku
CHAPTER 3: HTML Editors
CHAPTER 4: Kindle Versions
Kindle 1st Generation
Kindle 2nd Generation
Kindle DX
Kindle 3rd Generation (Kindle Keyboard)
Kindle 4th Generation (Kindle Touch)
Kindle 5
Kindle Fire
Kindle Fire HD
Kindle Paperwhite
CHAPTER 5: A Word About “Hidden” File Extensions on Windows
CHAPTER 6: .htm or .html?
Section I Review
SECTION II: THE BASICS
CHAPTER 7: Hello World
HTML is a free flowing language
Technical Lingo: “Whitespace”
CHAPTER 8: Italics
CHAPTER 9: Bold
CHAPTER 10: Nesting Order
CHAPTER 11: All Tags Should Be Lowercase
CHAPTER 12: The
Paragraph Tag
CHAPTER 13: The
Tag
Do Not Use the
Tag to Span an Area Larger Than a Paragraph in an e-book
CHAPTER 14: Block vs. Inline Tags
All Text Should Be Enclosed in Block Level Tags
Section II Review
SECTION III: CONVERTING TO KINDLE FORMAT
CHAPTER 15: KindleGen
CHAPTER 16: Kindle Previewer
CHAPTER 17: Transferring Your File to the Kindle
SECTION IV: COMBINING MULTIPLE HTML FILES INTO A KINDLE BOOK
CHAPTER 18: A Basic OPF file
CHAPTER 19: A Basic NCX file
SECTION V: INSIDE KINDLE
CHAPTER 20: Internals of a Kindle Book File
.mobi & .azw Files
MOBI vs. KF8 Format
MOBI Kindles
KF8 Kindles
Programs for Looking Inside a .mobi File
Initial Look Inside Your hello.mobi File
Two Books in One
Programs To Decompile a .mobi File
Mobi_Unpack.py
Calibre
Structure of a .mobi File
The MobiPocket File Format
Palm Database Header Fields
Detailed Examination of hello.mobi Header
hello.mobi Palm Database Header Fields
hello.mobi PDB Record Pointers
The PDB Data Records
PDB Data Records in our hello.mobi file:
PDB Record 0
hello.mobi PDB Record 0: PalmDOC Header
PDB Record 0: MOBI Header
hello.mobi PDB Record 0: MOBI Header
EXTH Header
OVERVIEW
List of EXTH Record Types
hello.mobi PDB Record 0: EXTH Header
Rest of PDB Record 0: Book’s Title
hello.mobi PDB Records 1-18
Summary
CHAPTER 21: Kindle Supported Characters
What characters do Kindle books support?
What characters does KindleGen support?
What characters can Kindles display?
CHAPTER 22: Inserting Special Characters
Using Unicode Encoding
Using HTML Entities
Using Unicode Code Points
Using the Hexadecimal Unicode Code Point Value
Using the Decimal Unicode Code Point Value
Converting Between Decimal and Hexadecimal
The Non-Breaking Space Character
SECTION VI: CSS
CHAPTER 23: Cascading Style Sheets (CSS)
Simple is Good, Complicated is Good
Self-Closing Tags
Space before /> ?
Underline
The Tag
The Old Fashioned Way
Alternate Placement of CSS Class Definitions
CHAPTER 24: Font Size
CHAPTER 25: Centering Text
CHAPTER 26: Comments
HTML Comments
CSS Comments
CHAPTER 27: Blank Lines
One Blank Line
Two Blank Lines
Other Vertical Spacings
px or em
CHAPTER 28: Horizontal Lines
Partial Horizontal Lines
Partial Horizontal Lines on Kindle
Partial Horizontal Lines on Nook e-reader
The “Correct” Way Which Doesn’t Work
CHAPTER 29: Blockquotes
CHAPTER 30: Paragraphs
Paragraph Indenting
Indented Blockquote Paragraph
Paragraph Outdenting
Outdented Blockquote Paragraph
Outdented Blockquote Paragraph with Right Margin
Paragraph Justification
CHAPTER 31: Poetry
CHAPTER 32: Code
CHAPTER 33: Images
Inserting An Image
Image Directory
Large Images Displayed as Small
Aspect Ratio
Image Caption
Centering Images
Inline Images e.g.
Large Images
Image Displaying a Table
Image Formats
How it Used to be Possible to Display Two Different Pictures, One for Low Resolution Kindles, and a Different One for High Resolution Kindles
CHAPTER 34: Dropcaps
Method 1: Use a Large Font for the First Character
Method 2: Use a fancy Image
CHAPTER 35: Smallcaps
Adding Smallcaps to Your Text
Example 1
Example 2
Example 3
Smallcaps in Other Text Sizes
CHAPTER 36: Tables
Overview
Examples
Cellpadding
Cellspacing
Aligning Cell Text
Bugs in Kindle Tables
Unwanted Wrapping of Last Character
Disappearing Images
Colspan
Colspan BUG
Rowspan
Rowspan BUG
Vertical Bars in Tables
Horizontal Bars in Tables
Combining Horizontal and Vertical Bars
CHAPTER 37: The
Tag
Do not put
at the beginning of a line
,
, or
?
CHAPTER 38: Strong & Em
Newer is not necessarily better
CHAPTER 39: Other Italic Tags
CHAPTER 40: Monospace Text
CHAPTER 41: Strikethrough
Strikethrough Bug
CHAPTER 42: Lists
Ordered Lists
Starting Number
Unordered Lists
Bullet Type
Nested Lists
Definition Lists
CHAPTER 43: Anchor
To Mark a Location
To Create a Hyperlink
Hyperlink to a Website
Hyperlink to a File
Hyperlink to a Location in a File
Hyperlink to a Location in the Current File
CHAPTER 44: Footnotes
Creating a Footnote
The Footnote Reference
Superscripts in Special Sized Text
Summary of the Footnote Reference
The Footnote Itself
Summary of Footnote Itself
Lengthy Footnotes
Removing the Underline from the Link Reference
Footnote Examples
EXAMPLE 1: Footnote at bottom of same file
EXAMPLE 2: Footnote in separate file named endnotes.htm
Fancy Footnotes
Indented Footnotes
Outdented Footnotes
CHAPTER 45: Page Break
CHAPTER 46: DOCTYPE
DOCTYPE for Kindle
DOCTYPE for EPUB
Where To Put the DOCTYPE Tag
SECTION VII: THE MAJOR PARTS OF A BOOK
CHAPTER 47: Chicago Manual of Style
CHAPTER 48: Title Page
CHAPTER 49: Table of Contents
CHAPTER 50: Cover Page
CHAPTER 51: A Complete NCX File
CHAPTER 52: A Complete OPF File
SECTION VIII: PUBLISHING YOUR BOOK
CHAPTER 53: Verify Your HTML
CHAPTER 54: Publish to Kindle Direct Publishing (KDP)
Digital Rights Management (DRM) Protection
Allow Lending For This Book
CHAPTER 55: Converting to EPUB
Create the EPUB Directory Structure
Validate with FlightCrew
Validate with EpubCheck
CHAPTER 56: Publish to Barnes & Noble’s Pubit website
CHAPTER 57: Other Sources of Formatting Ideas
CHAPTER 58: Creativity
APPENDIX
A: HTML Editors
B: HEX Editors
C: HTML Entities
D: Creative Writing Software
E: HTML/CSS Examples
Italics
Italics using HTML
Italics using CSS in header
Italics using CSS in External File
Bold
Bold using HTML
Bold using CSS in header
Bold using CSS in External File
Underline
Underline using HTML
Underline using CSS in header
Underline using CSS in External File
Strikethrough
strikethrough using HTML
strikethrough using CSS in header
strikethrough using CSS in External File
Centering Text
center using HTML
center using CSS in header
center using CSS in External File
Font Size
fontsize using HTML
fontsize using CSS in header
fontsize using CSS in External File
Sample CSS File
Sample OPF File
Sample NCX File
F: References
G: Prevent Kindle from freezing when you highlight text
About the Author