HTML or XHTML

3 posts / 0 new
Last post

I prefer working with XHTML in my e-books, but I see a lot of HTML based EPUBs out there. So are there any good reasons to choose XHTML instead of HTML when creating EPUB 3 ebooks?

EPUB 2 and 3 allow only the XML variant, not the tag soup variant, and this means, one can only use XHTML, no HTML.

XHTML has many advantages both for authors and implementors, because it is much simpler.
One can use relatively simple programs, XML-parsers to process XHTML files, resulting in a DOM-like structure.
For HTML5 (not the XML variant) one needs a relatively complex tag soups parser following all the extra rules defined in HTML5 to get something meaningful.
I think, about 90% of the HTML5 recommendation cares about specific problems of the tag soup variant, therefore authors using the XML-variant, especially EPUB-authors, can forget about 90% of useless issues without any restrictions to their content.

This means effectively for vendors to get the HTML5 tag soup variant right, that they are restricted to one of those libraries: mozilla/gecko, webKit/Blink, Opera/Presto Microsoft/trident.
If someone tries to to implement this in a new program/library, this will typically take several years with several people to get it right.
Therefore the HTML5 tag soup variant is a dead end both for authors and new implementors, it protects mainly existing implementations and professional tag soup designers from new competitors.

When compared to HTML4, HTML5 aims to be more of an application development platform, which includes not only laying out text and images, but also playing video and audio, interactive 2d and 3d graphics, storing data in the application, dealing with online and offline access to data, and real-time networking protocols for exchanging data as it happens. Both of these are used to in web programming today, although thinking about the future, using HTML5 is suggested. More about HTML5...

http://net-informations.com/q/mis/html5.html

Evan

Secondary menu