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.

<!DOCTYPE html>
	<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; }
	<div id="book">
		<h1>My Book Title</h1>
		<p align="center">by<br>My Name</p>
		<p align="center">Copyright &copy; YEAR</p>
		<p align="center"><a href=""></a></p>
		<p align="center"><small>I</small></p>
		<mbp:pagebreak />
		<a name="TOC"/>
		<h2>Table of Contents</h2>
		<a href="#intro">Introduction</a><br>
		<a href="#helloworld">Hello World</a><br>
		<mbp:pagebreak />
		<a name="intro"/>
	 	<p>Introduction goes here...</p>
	 	<mbp:pagebreak />
	 	<a name="helloworld"/>
	 	<h2>Hello World</h2>
	 	<p>Another section goes here...</p>
comments powered by Disqus
kindle_html_template.txt · Last modified: 2020/06/01 22:53 (external edit)