This shows you the differences between two versions of the page.
— |
kindle_html_template [2020/06/01 22:53] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Kindle HTML Template ====== | ||
+ | I've written a couple of Kindle ebooks. I prefer to work in HTML and the format works quite well once you figure it out. This is a template for starting a new Kindle HTML document. | ||
+ | |||
+ | <code html> | ||
+ | <!DOCTYPE html> | ||
+ | |||
+ | <head> | ||
+ | |||
+ | <title>My Book Title</title> | ||
+ | |||
+ | |||
+ | <!-- CSS --> | ||
+ | <style type="text/css"> | ||
+ | <!-- | ||
+ | |||
+ | body { background-color: white; padding: 0; font-family: sans-serif; font-size: 16px; } | ||
+ | p { margin: 0; padding: 0; text-indent: 10px; } | ||
+ | h1 { margin: 0; padding: 0; text-align: center; } | ||
+ | h2 { margin: 0; padding: 0; text-align: left; text-indent: 0; page-break-before: always; } | ||
+ | h3 { margin: 0; padding: 0; text-align: left; text-indent: 0; } | ||
+ | img { width: 100%; } | ||
+ | #book { width: 768px; margin: auto; } | ||
+ | |||
+ | --> | ||
+ | </style> | ||
+ | |||
+ | </head> | ||
+ | | ||
+ | <body> | ||
+ | |||
+ | <div id="book"> | ||
+ | |||
+ | <h1>My Book Title</h1> | ||
+ | <br> | ||
+ | <p align="center">by<br>My Name</p> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <p align="center">Copyright © YEAR</p> | ||
+ | <p align="center"><a href="mailto:joel@joeldare.com">joel@joeldare.com</a></p> | ||
+ | <br> | ||
+ | <p align="center"><small>I</small></p> | ||
+ | |||
+ | <br> | ||
+ | <mbp:pagebreak /> | ||
+ | <a name="TOC"/> | ||
+ | |||
+ | <h2>Table of Contents</h2> | ||
+ | <br> | ||
+ | <a href="#intro">Introduction</a><br> | ||
+ | <a href="#helloworld">Hello World</a><br> | ||
+ | |||
+ | <br> | ||
+ | <mbp:pagebreak /> | ||
+ | <a name="intro"/> | ||
+ | |||
+ | <h2>Introduction</h2> | ||
+ | <br> | ||
+ | <p>Introduction goes here...</p> | ||
+ | |||
+ | <br> | ||
+ | <mbp:pagebreak /> | ||
+ | <a name="helloworld"/> | ||
+ | |||
+ | <h2>Hello World</h2> | ||
+ | <br> | ||
+ | <p>Another section goes here...</p> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | </body> | ||
+ | |||
+ | </html> | ||
+ | </code> |