HTML and CSS Reference
In-Depth Information
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml ">
Exciting HTML5 content goes here...
</html>
So be careful not to leave out the declaration highlighted in bold above. Also, any and
all resources referenced in your HTML content need to be listed in the OPF <mani
fest> . Here's a sample manifest <item> for an external JavaScript file:
<item id="modernizr" href="modernizr-1.6.min.js" media-type="text/javascript"/>
Here's an <item> for an MP3 audio file:
<item id="rem_song" href="losing_my_religion.mp3" media-type="audio/mp3"/>
And here's an <item> for an MP4 video:
<item id="teen_vampires" href="new_moon.mp4" media-type="video/mp4"/>
The media-type attribute should contain the appropriate MIME MEDIA type for the
file format; you can find a list of MIME types at http://www.iana.org/assignments/media
-types/index.html
Alternatives to HTML5 and EPUB
As an open standard widely supported by nearly all major ereader devices (with one
notable exception ) , EPUB is an excellent option for doing HTML5 ebook development,
especially once the EPUB 3.0 specification is formally adopted. However, if you're
interested in adding multimedia and interactivity to your ebook content, but don't want
to go the HTML5/EPUB 3 route, here are some other options.
HTML5 and Mobi
If you're interested in making your ebook content available on Amazon's Kindle hard-
ware and software platforms, EPUB is not an option. Kindle devices support only the
proprietary Mobipocket (Mobi) format. Amazon provides a tool called Kindlegen for
converting EPUB to Mobi, but Kindlegen and the Kindle's HTML and CSS support in
Mobi is generally less robust than that in EPUB.
However, Kindle does now support embedded audio and video in Mobi content via
the HTML5 <audio> and <video> tags. Per Version 1.8 of the Amazon Kindle Publishing
Guidelines , videos in .mp4 , .mpg , .ps , and .ts formats are accepted. Audio files must be
in .mp3 format. See pages 22-28 of the guidelines for more details on content and
metadata requirements.
 
Search WWH ::




Custom Search