Answers.Body: <p>In addition to the resources Tom listed, Joshua Tallent's book <a href="http://kindleformatting.com/" rel="nofollow">Kindle Formatting</a> will give you tips for working around formatting problems. It's an old book and doesn't cover Kindle Format 8, but if you run into issues, it might give you ideas to try. Fortunately, KF8 has fewer limitations than MOBI 7, the older Kindle format, but the book will help if you want to support older Kindles.</p>
  
  <p>Another resource to explore is the <a href="http://wiki.mobileread.com/wiki/MOBI" rel="nofollow">MOBI</a> article at the MobileRead Wiki.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-12T17:41:20.060Z
Answers.Text: I have used Tallent's book before, but many of Tallent's tricks are no longer needed with KF8 format  and might just confuse somebody at this point.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-11T14:11:58.343Z
Answers.LastActivityDate: 2014-03-11T14:11:58.343Z
Answers.UserDisplayName: thinkulum
Answers.Body: <p>I'm familiar with all the resources mentioned here, but at the moment Paul Salvette's book  eBook Design and Development Guide is the best as far as practical steps for constructing the ebook. <a href="http://rads.stackoverflow.com/amzn/click/B009G2JMRK" rel="nofollow">http://www.amazon.com/The-eBook-Design-Development-Guide-ebook/dp/B009G2JMRK/</a> It's a year and a half old, but still basically relevant. </p>
  
  <p>A lot of the templates from the book are here: <a href="http://bbebooksthailand.com/vip/code-eBook-design-development.html" rel="nofollow">http://bbebooksthailand.com/vip/code-eBook-design-development.html</a> </p>
  
  <p>Elizabeth Castro's book is also good but probably a little too focused on ibooks  and inDesign. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-12T17:38:15.533Z
Answers.LastActivityDate: 2014-03-12T17:38:15.533Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <p>Your best bet is to start with a solid epub file and run that through either KindleGen or Kindle Previewer. Other tools such as Sigil and Calibre are convenient, but often cause problems down the road by inserting their own bits of code. If you want to be certain that you know what is causing your problems, it's always best to do it yourself.</p>
  
  <p>The single best resource for creating a solid, valid epub file is the IDPF's <a href="http://idpf.org/epub/30">epub 3.0 specification</a>. Once you feel like you've gotten it pretty close, use <a href="https://code.google.com/p/epubcheck/">epubcheck</a> to find and iron out the kinks. A valid epub 3.0 file should transform seamlessly into a valid mobi/KF8. Once you have the valid epub, you can begin your Kindle-specific styling. Make sure you pay attention to the specific requirements of the <a href="http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf">Kindle Publishing Guidelines</a> when you are doing so.</p>
  
  <p>For basic getting started guides, you might check out Harrison Ainsworth's "<a href="http://www.hxa.name/articles/content/epub-guide_hxa7241_2007.html">EPUB Format Construction Guide</a>." It's a bit dated by now, and only deals with epub 2.0.1, but it will cover the basics pretty well. O'Reilly has a book on <em><a href="http://shop.oreilly.com/product/0636920024897.do">EPUB 3 Best Practices</a></em> that's not too shabby, but it might go into more detail than you need to get started.</p>
  
  <p>Do a bit of reading, but not too much, and then find a non-DRM'ed epub file and tear it apart (just change the filename from .epub to .zip and unzip it) to see what makes it tick. Change stuff, re-zip is (how you do that will depend on the operating system you use) run it through epubcheck, and see what error messages you get. Getting a valid book is quite doable with minimal experience.</p>
  
  <p>As far as styling goes: there are lots of quirks in reading systems and devices. If you want to only do Kindle, you're cutting out a lot of potential issues, but each of Amazon's devices has its own quirks as well, so be prepared to test a lot, and ask lots of questions when problems come up.</p>
  
  <p>Best of luck!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-08T16:28:16.873Z
Answers.Text: Is there any advantage to using epub 3 rather than epub 2 when converting to Kindle formats?
Answers.UserDisplayName: evilsoup
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-08T16:40:06.807Z
Answers.Text: Honestly, it's been so long since I've done any epub 2.0.1 that I couldn't say. Why would you not use the current standard format?
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-08T16:45:09.887Z
Answers.Text: Well, this should probably be a separate question, but since the epub e-readers will nearly *all* support epub 2, while some of them will not support epub 3, I see no reason to bother with epub 3 (assuming I don't ever need the additional features). Since I'm just using pandoc to generate the things, it's not a big deal to generate epub 3 in order to feed it into kindlegen, but I was just wondering if there was any advantage to doing so.
Answers.UserDisplayName: evilsoup
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-08T16:51:43.403Z
Answers.Text: My company has been doing exclusively epub 3 for over 2 years, and we've never seen or had reports of any devices not displaying epub 3 files properly. As long as you include the toc.ncx, it'll work just fine.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-09T06:03:56.363Z
Answers.Text: Thanks Tom! I really really appreciate your detailed answer and help. I am gonna start reading on the specifications of epubs and how to create them and then ask tonnes of questions around :) You say that the Kindle Publishing Guidelines must be followed but won't KindleGen automatically create a file compatible for kindle once a valid epub file is fed to it ?
Answers.UserDisplayName: QPTR
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T08:27:11.247Z
Answers.Text: My pleasure, glad to help! The reason you have to follow the guidelines is because there is a lot of wiggle-room in the epub spec--many things are optional, etc. Amazon's guidelines narrow down the scope a bit. In a perfect world, the epub spec would be the only one we'd need, but unfortunately individual device and reading system manufacturers pick and choose which bits of the spec they support. Think of it like the web in the late '90s, when Netscape and IE interpreted thing in completely different ways, and you won't be too far from the truth. More's the pity.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T16:10:40.473Z
Answers.Text: Tracking support for epub3: check out the BISG EPUB 3 Support Grid: [link](http://epubtest.org/results/)
Answers.UserDisplayName: mattrweaver
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-08T09:55:22.707Z
Answers.LastActivityDate: 2014-03-08T09:55:22.707Z
Answers.UserDisplayName: Tom
Body: <p>I want to be able to create an ebook on my own for Kindle. I want to do this in HTML, and then later use <a href="http://www.amazon.com/gp/feature.html?docId=1000765211" rel="noreferrer">KindleGen</a> and <a href="http://www.amazon.com/gp/feature.html?docId=1000765261" rel="noreferrer">KindlePreviewer</a> for generating a <code>.mobi</code> file and previewing. I've looked around the web for guidance, but while they do have basic instructions, such as creating page breaks, including text, and including basic CSS, they do not seem to go into much detail. </p>
  
  <p>What I need is a guide that might help me create CSS and HTML for an ebook that comes out perfectly in all versions of Kindle, is there any such guide in the form of a book or a web page available out there? Something that helps me include custom bullets and images, stuff like that, and helps me iron out the kinks I get when I try to use the usual HTML/CSS for my ebook. Such as a current problem that I am having of custom bullets appearing shifted way away from the text, and the image of these custom bullets appearing with different sizes in different versions of Kindle. </p>
  
  <p>(I know basic HTML and CSS and willing to learn as much as I need to create that perfect ebook)</p>
  
Tags: <kindle><html><css><kindle-previewer>
Title: Is there a detailed guide for creating an ebook for Kindle in HTML/CSS
UserDisplayName: QPTR
ThreadText: # Is there a detailed guide for creating an ebook for Kindle in HTML/CSS
  
  (Asked by: username_0 on 2014-03-08)
  
  I want to be able to create an ebook on my own for Kindle. I want to do this in HTML, and then later use [KindleGen](http://www.amazon.com/gp/feature.html?docId=1000765211) and [KindlePreviewer](http://www.amazon.com/gp/feature.html?docId=1000765261) for generating a `.mobi` file and previewing. I've looked around the web for guidance, but while they do have basic instructions, such as creating page breaks, including text, and including basic CSS, they do not seem to go into much detail.
  
  What I need is a guide that might help me create CSS and HTML for an ebook that comes out perfectly in all versions of Kindle, is there any such guide in the form of a book or a web page available out there? Something that helps me include custom bullets and images, stuff like that, and helps me iron out the kinks I get when I try to use the usual HTML/CSS for my ebook. Such as a current problem that I am having of custom bullets appearing shifted way away from the text, and the image of these custom bullets appearing with different sizes in different versions of Kindle.
  
  (I know basic HTML and CSS and willing to learn as much as I need to create that perfect ebook)
  
  **Tags:** kindle, html, css, kindle-previewer
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2014-03-08. Score: 9 | Accepted answer
  
  Your best bet is to start with a solid epub file and run that through either KindleGen or Kindle Previewer. Other tools such as Sigil and Calibre are convenient, but often cause problems down the road by inserting their own bits of code. If you want to be certain that you know what is causing your problems, it's always best to do it yourself.
  
  The single best resource for creating a solid, valid epub file is the IDPF's [epub 3.0 specification](http://idpf.org/epub/30). Once you feel like you've gotten it pretty close, use [epubcheck](https://code.google.com/p/epubcheck/) to find and iron out the kinks. A valid epub 3.0 file should transform seamlessly into a valid mobi/KF8. Once you have the valid epub, you can begin your Kindle-specific styling. Make sure you pay attention to the specific requirements of the [Kindle Publishing Guidelines](http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf) when you are doing so.
  
  For basic getting started guides, you might check out Harrison Ainsworth's "[EPUB Format Construction Guide](http://www.hxa.name/articles/content/epub-guide_hxa7241_2007.html)." It's a bit dated by now, and only deals with epub 2.0.1, but it will cover the basics pretty well. O'Reilly has a book on *[EPUB 3 Best Practices](http://shop.oreilly.com/product/0636920024897.do)* that's not too shabby, but it might go into more detail than you need to get started.
  
  Do a bit of reading, but not too much, and then find a non-DRM'ed epub file and tear it apart (just change the filename from .epub to .zip and unzip it) to see what makes it tick. Change stuff, re-zip is (how you do that will depend on the operating system you use) run it through epubcheck, and see what error messages you get. Getting a valid book is quite doable with minimal experience.
  
  As far as styling goes: there are lots of quirks in reading systems and devices. If you want to only do Kindle, you're cutting out a lot of potential issues, but each of Amazon's devices has its own quirks as well, so be prepared to test a lot, and ask lots of questions when problems come up.
  
  Best of luck!
  
  > **Comments:**
  > **username_4**: Is there any advantage to using epub 3 rather than epub 2 when converting to Kindle formats?  
  > **username_3**: Honestly, it's been so long since I've done any epub 2.0.1 that I couldn't say. Why would you not use the current standard format?  
  > **username_4**: Well, this should probably be a separate question, but since the epub e-readers will nearly *all* support epub 2, while some of them will not support epub 3, I see no reason to bother with epub 3 (assuming I don't ever need the additional features). Since I'm just using pandoc to generate the things, it's not a big deal to generate epub 3 in order to feed it into kindlegen, but I was just wondering if there was any advantage to doing so.  
  > **username_3**: My company has been doing exclusively epub 3 for over 2 years, and we've never seen or had reports of any devices not displaying epub 3 files properly. As long as you include the toc.ncx, it'll work just fine.  
  > **username_0**: Thanks Tom! I really really appreciate your detailed answer and help. I am gonna start reading on the specifications of epubs and how to create them and then ask tonnes of questions around :) You say that the Kindle Publishing Guidelines must be followed but won't KindleGen automatically create a file compatible for kindle once a valid epub file is fed to it ?  
  > **username_3**: My pleasure, glad to help! The reason you have to follow the guidelines is because there is a lot of wiggle-room in the epub spec--many things are optional, etc. Amazon's guidelines narrow down the scope a bit. In a perfect world, the epub spec would be the only one we'd need, but unfortunately individual device and reading system manufacturers pick and choose which bits of the spec they support. Think of it like the web in the late '90s, when Netscape and IE interpreted thing in completely different ways, and you won't be too far from the truth. More's the pity.  
  > **username_5**: Tracking support for epub3: check out the BISG EPUB 3 Support Grid: [link](http://epubtest.org/results/)  
  
  ---
  
  ### Answer by username_1 on 2014-03-11. Score: 2
  
  In addition to the resources Tom listed, Joshua Tallent's book [Kindle Formatting](http://kindleformatting.com/) will give you tips for working around formatting problems. It's an old book and doesn't cover Kindle Format 8, but if you run into issues, it might give you ideas to try. Fortunately, KF8 has fewer limitations than MOBI 7, the older Kindle format, but the book will help if you want to support older Kindles.
  
  Another resource to explore is the [MOBI](http://wiki.mobileread.com/wiki/MOBI) article at the MobileRead Wiki.
  
  > **Comments:**
  > **username_2**: I have used Tallent's book before, but many of Tallent's tricks are no longer needed with KF8 format  and might just confuse somebody at this point.  
  
  ---
  
  ### Answer by username_2 on 2014-03-12. Score: 1
  
  I'm familiar with all the resources mentioned here, but at the moment Paul Salvette's book eBook Design and Development Guide is the best as far as practical steps for constructing the ebook. [http://www.amazon.com/The-eBook-Design-Development-Guide-ebook/dp/B009G2JMRK/](http://rads.stackoverflow.com/amzn/click/B009G2JMRK) It's a year and a half old, but still basically relevant.
  
  A lot of the templates from the book are here: <http://bbebooksthailand.com/vip/code-eBook-design-development.html>
  
  Elizabeth Castro's book is also good but probably a little too focused on ibooks and inDesign.
  
  
  ---
  
  