HTML and CSS Reference
In-Depth Information
I'm not seeing any video. I've
triple-checked the code and
I have the video in the right
folder. Any ideas?
Yes, it's probably the video format.
While the browser makers have agreed on what the
<video> element and API look like in HTML5, not
everyone can agree on the actual format of the video files
themselves. For instance, if you are on Safari, H.264
format is favored; if you're on Chrome, WebM is favored;
and so on.
By t he tim e yo u
read this, these
form ats c ould
be m ore w idely
suppo rted acro ss
all b rowse rs. So if
your video 's wo rking,
grea t. Alw ays c heck
the Web t o see
the latest on t his
unfo lding topic . And
we'l l come back for
mor e on t his t opic
shor tly.
In the code we just wrote, we're assuming H.264 as a
format, which works in Safari, Mobile Safari, and IE9+.
If you're using another browser, then look in your “video”
folder and you'll see three different types of video, with
three different file extensions: .mp4, .ogv, and .webm
(we'll talk more about what these mean in a bit).
For Safari, you should already be using .mp4 (which
contains H.264).
For Google Chrome, use the .webm format by replacing
your src attribute with:
If you're using Firefox or Opera, then replace your src
attribute with:
And if you're using IE8 or earlier, you're out of luck—
wait a sec; this is Chapter 12! How could you still be using
IE8 or earlier? Upgrade! But if you need to know how to
supply fallback content for your IE8 users, hang on; we're
getting to that.
Search WWH ::

Custom Search