Oli.jp

Articles…

Amazon “HTML5” and ebook formats

As I’m currently writing a book using HTML5 and CSS3, I was excited to hear of Amazon’s “Announcing HTML5 Support in Kindle Format 8” press release. There’s been a move from custom formats back towards HTML5, with ePUB recently announcing ePUB 3 will be based on XHTML5 (the XML serialization of HTML5), and it seems pretty obvious future book readers will also have web browsers. I hoped Amazon was upping the ante and allowing straight HTML5/CSS3-based books.

Sadly, the linked “List of supported HTML tags and CSS elements[sic] indicates that Amazon is just ridin’ that HTML5 bandwagon into marketing BS-land. Here’s a breakdown of Amazon “HTML5”, compared to HTML5 and HTML 4:

Table Key:
  • Green: New HTML5 element in Amazon “HTML5”
  • Yellow: HTML5 element not in Amazon “HTML5”
  • Red: HTML5 element that should be in Amazon “HTML5”, or HTML 4 element that shouldn’t be in :)
Comparison of elements in HTML 4, HTML 5 & Amazon “HTML5”
HTML 4 HTML5 Amazon “HTML5”
91 elements 108 elements 75 elements
aaa
abbrabbr
acronym
addressaddressaddress
applet
areaarea
articlearticle
asideaside
audio
bbb
basebase
basefont
bdi
bdobdo
big
blockquoteblockquoteblockquote
bodybodybody
brbrbr
buttonbutton
canvas
captioncaptioncaption
centercenter
citecitecite
codecodecode
colcolcol
colgroupcolgroup
command
datalist
dddddd
deldeldel
details
dfndfndfn
dir
divdivdiv
dldldl
dtdtdt
ememem
embed
fieldsetfieldset
figcaptionfigcaption
figurefigure
font
footerfooter
formform
frame
frameset
h1h1h1
h2h2h2
h3h3h3
h4h4h4
h5h5h5
h6h6h6
headheadhead
headerheader
hgrouphgroup
hrhrhr
htmlhtmlhtml
iii
iframeiframe
imgimgimg
inputinput
insinsins
isindex
kbdkbdkbd
keygen
labellabel
legendlegend
lilili
linklinklink
mapmapmap
markmark
menumenumenu
metameta
meter
navnav
noframes
noscriptnoscript
objectobject
ololol
optgroupoptgroup
optionoption
outputoutput
ppp
paramparam
preprepre
progress
qqq
rprp
rtrt
ruby
ss
sampsampsamp
scriptscript
sectionsection
selectselect
smallsmallsmall
sourcesource
spanspanspan
strikestrike
strongstrongstrong
stylestylestyle
subsubsub
summarysummary
supsupsup
tabletabletable
tbodytbodytbody
tdtdtd
textareatextarea
tfoottfoottfoot
ththth
theadtheadthead
timetime
titletitletitle
trtrtr
track
tt
uuu
ululul
varvarvar
video
wbrwbr

HTML5? Ohrly?? Amazon is missing 33 HTML5 elements (or 35 HTML 4 elements). Claiming it’s HTML5 when they’re missing 30% of HTML5’s elements seems a bit rich. Dropping forms and application-specific elements is understandable, but it’s going to limit book writers and publishers in the future.

I will let someone else do the breakdown on CSS3, but calling this “CSS3 support” is embarrassing. It’s not even CSS 2.1! Of the 95 properties listed, here are the non-CSS 2.1 ones:

I also noticed some strange omissions. No background or background-image(!), which makes background-size, background-clip and background-origin completely useless. There’s clip for “clip[ping] an absolutely positioned element”, but no position. They have <rp> and <rb> for ruby text, but no <ruby>.

I guess these features will be “good enough” for many writers and publishers, and it’s great to see SVG support, but I’m still scratching my head why these ebook formats even exist. Apart from @page support (in Opera’s latest dev build, being implemented in WebKit), and some internationalisation support for e.g. CJK text (also being implemented), the web stack already does everything ebook formats do, plus much more (<video>, <audio>, <canvas>…). With the Kindle Fire and iPad it also seems obvious to me that future ebook readers will have web browsers.

Why bother?

If you have any feedback or comments, contact me via Twitter (@boblet) or Google+ (Oli Studholme).