preload
The Eternal City’s Sergio Carrera on CNN Robot Comics on CNN.com
Aug 11

UPDATE: We’ve updated the info below to better reflect the current Amazon/Kindle marketplace.

LAST UPDATED 10/28/09

Time for Part 2 (of 3) of our vundubar CREATING COMICS FOR THE KINDLE tutorial series!

You can read PART 1: OPTIMIZING THE IMAGES by CLICKING HERE.

You’ve got your images all squared away. It’s yea many pages in length and they’re all lined up in the proper reading order. Not that they have to be, but I recommend making the next part easy on yourself and make sure to call all the images something simple and obvious, like “page1.png”, “page2.png”, etc.

What next? Next it’s time to create the dreaded HTML Document that acts as the actual layout for your Kindle comic. All you need to do is have all your images in a single folder on your computer, then add an HTML doc titled “index.html”. So long as the images and HTML doc are all within the same folder, the link to the images can be relative and so all you need to use are the image files’ names.

For those unfamiliar with HTML, here’s a sample:

<img src=”page1.png”><img src=”page2.png”><img src=”page3.png”>, etc, etc. This puts all the images in the proper order when read on the Kindle when you upload the folder as a single ZIP file.

SUPPORTED HTML

There’s very little HTML supported by the Kindle currently, nearly none that helps you in the image crafting department. You can’t center an image with HTML, so you’ll need to do what was suggested in PART 1 of this tutorial series and center the art within a 525 x 640 white or black background (this allows every image to be the maximum 525 x 640 bar none). You definitely shouldn’t resize the images with “width” or “height” HTML and alternate text or style elements are generally pointless. Image-wise, the only HTML you should be using is the <img src=”nameofimage.png”> tag.

So what will you need HTML for? Three major things: a Table of Contents, Special Features (an Introduction, Foreword, Afterword, etc.), and defining your book’s Start Point.

TABLE OF CONTENTS

Here’s where the actual HTML composing begins to come into play. You’ll want a TOC for your comic, not just to have a nifty list of chapters and/or special features, but also for easy navigation through the comic itself. Kindle page load times are radically slow by mobile device standards, so being able to jump easily to page 10, 20, 30, 40, etc. is key. Give your readers multiple jump-to points in the TOC.

I’d recommend writing your HTML doc with a code editing software such as KOMPOZER. It’ll automatically add missing HTML you may have left out and allow you to visually edit your doc whenever possible. However, just to be thorough, here’s how any HTML doc should begin. Insert the following code to begin and end the doc:

<html><body></body></html>

You’ll place all the other HTML in-between the first two and the last two tags there. To insert a Table of Contents, user the following toc div tag:

<html><body><div=”toc”></div></body></html>

Then construct your Table of Contents between the “div” tags. So if you want a TOC that looks like this:

You’d type up the following in HTML:

<html><body>

<div=”toc”>

<div style=”text-align: center;”><b>TABLE OF CONTENTS</b></div>

<br>

<br><div style=”text-align: left;”>
<b><u>THE DESERT PEACH #1 Cover<br>
Inside Cover/Copyright Page</b><br>
<br>
“<b>Who Is This Man?</b>”<br>
<ul>
<li><b>PAGE 1</b></li>
<li><b>PAGE 11</b></li>
<li><b>PAGE 21</b></li>
<li><b>PAGE 31</b></li>
<li><b>PAGE 41</b></li>
<li><b>PAGE 51</b></li>
</ul>
<b><br>
<u>The Holocaust and the Boy on the Fence
<em>(An
Introduction to THE DESERT PEACH Series)</em></u>

</div>

</body></html>

In that example, the <b></b> tags are for BOLD, the <br> tags are for line breaks, the <li></li> tags make a nice ordered indented bullet-point list for the pages, and the <u></u> tags make underlined text.

But what you’ll also want are LINKS – a list that is clickable and will properly send readers to the specified locations in the book. To manage this, we use ANCHOR TAGS. For the anchor link used in the TOC, use: <a href=”#name-of-anchor”></a> Then for the anchor name (how we name the anchor in the first place) we place the following code around the proper point in the book: <a name=”name-of-anchor”></a> (note there is no pound sign used in the anchor name, just the anchor link).

So for instance, the above long example, with anchor links, becomes:

<html><body>

<div=”toc”>

<div style=”text-align: center;”><b>TABLE OF CONTENTS</b></div>
<br>
<div style=”text-align: left;”><b><br>
<u><a href=”#cover”>THE DESERT PEACH #1 Cover</a></u><br>
<a href=”#inside-cover”>Inside Cover/Copyright Page</a>
</b><br>
<br>
“<u><b>Who Is This Man?”</b></u><br>
<ul>
<li><b><a href=”#page1″>PAGE 1</a></b></li>
<li><b><a href=”#page11″>PAGE 11</a></b></li>
<li><b><a href=”#page21″>PAGE 21</a></b></li>
<li><b><a href=”#page31″>PAGE 31</a></b></li>
<li><b><a href=”#page41″>PAGE 41</a></b></li>
<li><b><a href=”#page51″>PAGE 51</a></b></li>
</ul>
<b><br>
<a href=”#introduction”>
<u>The Holocaust
and the
Boy on the Fence
<em>(An
Introduction to THE DESERT PEACH Series)
</em></u></a>

</div>

</body></html>

And then for your images you’ll add the anchor names, so they’ll look like so (as a snippet of an example):

<html><body>

<div=”toc”>

<div style=”text-align: center;”><b>TABLE OF CONTENTS</b></div>
<br>
<div style=”text-align: left;”><b><br>
<u><a href=”#cover”>THE DESERT PEACH #1 Cover</a></u><br>
<a href=”#inside-cover”>Inside Cover/Copyright Page</a></b><br>
<br>
“<u><b>Who Is This Man?”</b></u><br>
<ul>
<li><b><a href=”#page1″>PAGE 1</a></b></li>
<li><b><a href=”#page11″>PAGE 11</a></b></li>
<li><b><a href=”#page21″>PAGE 21</a></b></li>
<li><b><a href=”#page31″>PAGE 31</a></b></li>
<li><b><a href=”#page41″>PAGE 41</a></b></li>
<li><b><a href=”#page51″>PAGE 51</a></b></li>
</ul>
<b><br>
<a href=”#introduction”><u>The Holocaust
and the
Boy on the Fence
<em>(An
Introduction to THE DESERT PEACH Series)</em></u></a>

</div>

<a name=”cover”><img src=”DP01-CVR.jpg”></a>

<a name=”inside-cover”><img src=”DP01-insidecover.png”></a>

<a name=”#page1″><img src=”page01.png”>

<img src=”page02.png”>

<img src=”page03.png”>

<img src=”page04.png”>

<img src=”page05.png”>

<img src=”page06.png”>

<img src=”page07.png”>

<img src=”page08.png”>

<img src=”page09.png”>

<img src=”page10.png”>

<a name=”page11″><img src=”page11.png”></a>

</body></html>

And so on. Simple wrap the <a name=”"></a> tags around the image or point in the comic you want the entry int he TOC to lead to, and readers will then be able to click on the line and be taken right to it.

IMPORTANT: Amazon automatically creates a “Preview” for potential buyers to download and read before buying. Whatever you make your “Chapter One” (the pages between the first TOC link and the second TOC link) will become this preview. With one additional possible customization we’ll get to in a mo’.

SPECIAL FEATURES

When it comes to the NON-IMAGE portions of your comic, you have two options:

  1. Make them images anyway.
  2. Make them HTML.

It’s a coin-toss as to which is the better choice, depending on what you want the final result to be. On the one hand, the HTML supported by the Kindle is exhaustively limited, meaning there’s hardly anything in the way of design that you can add to your Foreword, or Afterword, or Letter’s Page. On the other hand, the plain text as it displays on the e-Ink Kindle screen is beauteous in its own right. It’s crystal clear and easy on the eyes. It makes for good reading, arguably better reading than any more decorative display could offer.

But if you want atmosphere, you’ll need to use images. Dice up your full-page comic-book-sized text into little Kindle-sized paragraphs with fancy fonts and art. Basically you can have an image like so, with plain ol’ rich (Kindle) text and an image tossed in:

Or you can have the whole screen be an image and designed to fit the Kindle screen, like so:

As you can see, the “designed” image is much prettier, but to be 100% honest, it’ll be just that much more of a strain to read it on the Kindle screen as compared to the rich text version. The rich text is cleaner, bigger, clearer. The image version is, of course, more artistic. For the image, just use the same image HTML you used in the earlier parts of this tutorial. For rich text HTML, the above rich text example would be written like so:

<div style=”text-align: center;”><img
style=”width: 400px; height: 313px;”
alt=”Robot Comics’ Amazon Kindle Mascot” src=”amazon-final.png”><br>
</div>
<br>
<div style=”text-align: left;”>Bringing Donna’s work, at
long last, to the forefront of the modern
marketplace is just a single plan in a larger scheme of mine,
tentatively referred to as “<b>KlLLING
THE GRIZZLY COMICS</b>” (head on over to

You don’t have to worry about where the page will cut off – just write all the text in a seamless run of paragraphs (or “<p>” tags). The Kindle will sweetly, automatically make the proper page breaks and make certain to display all the images properly.

If, however, you have a particular place you want to see a page break – for instance, if you had an AFTERWORD followed by, say, a bonus short prose story, then you won’t want the end of the Afterword to be on the same page as the beginning of the short story – too tacky. So use this standard mobipocket code to insert a pagebreak:

<mbp:pagebreak></mbp:pagebreak>

START POINT

The last thing you’ll use HTML for is to create a “Start” point for the comic – should it be the cover? The Table of Contents? The first page? Your choice, but realize that there’s a slight flaw in how the Kindle reads the Start point: wherever you “Start”, that’s where your automatically generated “Preview” for potential buyers will start.

UPDATED 10/28: I’ve recently learned a bit more about this flaw. Kindle support claims that any book’s “Preview” will be automatically generated using the “First 10% of the content, rounded up”.  Unfortunately, for comics, this becomes an issue because there are mostly images.  If you had ONLY images, then it would work – 10 images/pages would = 1 page preview.  However, if you include a TOC, which is text, then the Kindle goes a wee bit apes**t.  When you attempt to publish the book on the Kindle Digital Text Platform (which we’ll explore in full in PART 3), you get to preview the book before hitting “Publish”.  In the preview, you’ll note that there’s a page-count kind of counter on the bottom, that tracks what “Location” in the book you’re at depending on the page you’re on.  However, any text-based part of the book will take up a huge portion of this counter compared to the images – the TOC alone will take up 10-20%!!!

For whatever reason, the Kindle reads the single images/pages as being small parts of the overall book, while the text it reads as a far more weightier amount of “content”.  When trying to advance to a further Location in the DTP Preview, you’ll note that the TOC will simply advance line-by-line, showing you the same page, but with a new line added and an older one lost.  Eventually, after clicking down nearly 20% of the total Location-bar’s length, voila!  You now see the images.  So with a TOC added, your 10% preview becomes just the cover and the TOC and nothing else!  Yikes.

The best way to avoid this is to put the TOC at the END of the HTML document, rather than at the beginning.  Readers bring up the TOC via the “Menu” option on the Kindle, so it’s by and large unimportant to have them see it in the front.  Not to mention, you’d have to place the “Start” tag after the TOC in any event, so there is currently no way whatsoever to have the cover and TOC be the first thing readers see AND have the Kindle auto create a worthwhile preview on the Amazon marketplace.  Instead, place the TOC at the end, and have the first actual page of the comic be the “Start”.

How to use the start point?  A start point is created by using the word “start” as an anchor name, so:

<a name=”start”><img src=”page01.png”></a>

Will make the comic start right on Page 1. The Kindle allows users to bring up the Cover and/or Table of Contents at any time, regardless of your own Table of Contents and order of things. So it’s truly no problem with skipping over these for the first opening of the book. Kindle user know how to bring these up if they want to.

And that’s that! Whew!

Part 3 is coming VERY SOON now! (looks for it around early November)

NEXT: PUBLISHING your comic on the Kindle!

Share this article
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • MisterWong
  • Mixx
  • Ping.fm
  • Reddit
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz
  • Posterous
  • Twitter
  • LinkedIn
  • Propeller

Related posts:

  1. Adapting Comics for the Amazon Kindle Part 1 – Optimizing Images
  2. Adapting Comics for the Amazon Kindle Part 3 – Publishing Your Comic
  3. Robot Comics Launches on the Amazon Kindle
  4. The Desert Peach #1 for Amazon Kindle 1 & 2
  5. The Desert Peach #2 for Amazon Kindle 1 & 2

15 Responses to “Adapting Comics for The Amazon Kindle Part 2 – The HTML Doc (Tutorial)”

  1. Adapting Comics for the Amazon Kindle Part 1 - Optimizing Images | Robot Comics Says:

    [...] in part 2: the HTML document (Now up! CLICK HERE). Share this [...]

  2. Elena Says:

    Thank you so much for this, what a great resource!

    One question, the html line for START, where does that go in the doc? Can it be inserted anywhere?

  3. dbaxter Says:

    Yes, it can go anywhere in the file, or in other words you can choose for any page to “start” the book. Just put the tag around the page in question, then make certain on your TABLE OF CONTENTS to have the anchor link refer to “start” instead of anything else. So for instance, if you want the comic to start on Page 1, make certain to not only put the tag around the Page 1 image, but also to have the “Chapter 1″ or “Page 1″ line on the Table of Contents refer to rather than or anything like that. The “start” becomes that page’s reference name for any other part of the doc as well as making it the default Kindle starting point.

    Make sense? –Dave B.

  4. aldwin Says:

    thanks for this very informative tutorial.

    i have followed the steps, and i am now waiting for part3.

    would you also be talking about converting this html to .mobi format, maybe using calibre or any other program? cause i would like to be able to read my mangas on my kindle.

    thanks

  5. dbaxter Says:

    Absolutely, aldwin, I use Calibre to convert to .mobi (and in fact spent a bloody month getting it just right for the Kindle 2). I’ll post a special tutorial on mobi files and the Kindle soon, just for you :)

  6. aldwin Says:

    thank you very much. i appreciate it. :D

  7. Adapting Comics for the Amazon Kindle Part 3 – Publishing Your Comic | Robot Comics Says:

    [...] You can read PART 2: THE HTML DOC by CLICKING HERE [...]

  8. Robert Says:

    Do comics for android, have the same HTML limitations.
    Or is there a way to do something like Scott McCloud’s infinite canvas?

  9. dbaxter Says:

    Hey, Robert – while every device does realistically have limitations, the Android is far, FAR more flexible than the Kindle. The Kindle is meant to be a text “eReader” and due to this its ability to handle images of any kind are severely limited. As far as McCloud’s “Infinite Canvas” in concerned, mobiles like Androids and iPhones definitely approach this infinite ability (hampered only my imagination and creativity and – let’s face it – the ability to actually code what your mind dreams up). Mobiles can add vibration, animation, zoom, fade-out, push-up, push-down, display whole pages, have it pan-n-scan, etc. The canvas is indeed limited only to what you can make the software accomplish.

    Any time you deal with a third-party software (Google’s Android platform, Apple’s iTunes, etc.) you’ll have some limitations, as the platform isn’t yours like “the internet” is yours. But often, like McCloud suggests, you can almost always accomplish a lot more than it initially seems if you sit down and really give it some creative thought. And if you have someone that can make it happen programmer-wise, of course :)

  10. Srinath Says:

    hey, I was trying to add image in the kindle…. I mean… I have some text and I have to add the text above the images. Image should be in backround and txt should come above the background image.

    I am trying with so many ways but its not working… kindle PC its not supporting.
    Please let me know is it possible or not in kindle.

  11. robotcomics Says:

    Hey, Srinath – do you mean you want the text to wrap around the image (text above, then image, then more text below, maybe some text off to the side of the image as well)…or do you mean you want the text to literally be ON the image, super-imposed and covering the image?

    If the former, then it’s basic HTML you can learn about here – http://www.pageresource.com/html/image1.htm

    If it’s the latter, though, the only way to do this would be to prepare the image with the text already on it, the whole thing as an image, just like comic pages have text written/drawn on them. Do this in illustrator or photoshop and then you can add that image with the text already drawn on it wherever you’d like. But that’s the only way currently to manage this.

  12. Srinath Says:

    Hi all,

    I have a problem in using div.. am not getting the bottom border of the div if i insert in the table.

    I have a table with 1 row and 2 column, in the second column I inserted div with the border 2 for the div. when I build the file for prc the bottom border is not coming in div. If I remove the table it its working fine.

    I cant use only the div becz I have some text in the first column. Please help on this.

  13. robotcomics Says:

    Sorry to say, Srinath, Kindle doesn’t currently support tables, which is why the div won’t work within one. In order to include a table in a kindle document, you’ll need to make it an image (jpg, png, etc.) you can insert rather than an HTML table. So far, there’s no other way around this that I know of.

  14. Umesh Says:

    Hi all,

    Kindle is supporting the tables, but tables are displaying properly also. Main thing you cant define rules if you given like this all the table having rules but we need only groups ” it is not working, and also all the table attributes are not working in kindle devices. In your html document working fine in Browsers but it is not supporting Kindle. Very difficult to formatting the texts.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes