Tech Blog

The X of HTML and Reading on Kindle

The X of HTML and Reading on Kindle

XHTML and reading on Kindle

For anyone involved in producing digital books, terms like CSS, HTML, or XHTML are nothing new. As we've explained in previous posts, a digital book file in the EPUB3 format is really a kind of small, compressed website, with content files, images, design settings, fonts, and more. Content files on websites are written in HTML, whereas for digital book files the chosen format is a similar but slightly different one - XHTML. This is a format that is stricter about meeting the standards for writing content to be displayed on different devices and platforms. In most cases, the various reading apps will display HTML files identically too, if the book creator insisted on using them - contrary to what the EPUB3 standard specifies. And indeed, especially here in our small country so fond of "shortcuts," you can find book creators who prepare digital books and distribute them to all the stores just a second after discovering a new button in their InDesign software... "Why learn the file structure? It's automatic, isn't it?" is a line we hear a lot in the courses we teach to professionals in the field.

So why be strict and fussy about the XHTML format, rather than HTML or plain text?

First - because the format is more exacting about the file's structure, and therefore prevents future errors during conversion or when reading with different tools. In fact, a simple EPUBCHECK run will warn the book creator if their XHTML is broken or non-compliant. Second - and no less important - if we ever want to convert to the MOBI format that Amazon uses, for example (on Kindle devices), our original EPUB3 must be completely valid, without a single XHTML error, or the conversion simply won't succeed and the Kindle device won't display a proper book, certainly not in Hebrew.

Need a hand with your ePub?

We produce professional ePub3 books

From reflowable to Fixed-Layout, KIDS and audiobooks - our Production Studio can help.