HTML and CSS Reference
In-Depth Information
Try iT
In this Try It you learn how to include HTML5 video in your web page.
Lesson requirements
You will need the tpa_nova.html file from the Lesson_25 folder, as well as a text editor and a mod-
ern web browser such as Safari 5+, Firefox 3.5+, or Opera 10+.
You can download the code and resources for this lesson from the topic's web
page at www.wrox.com .
step-by-step
1.
Open your text editor.
2.
From the Lesson_25 folder, open tpa_nova.html .
3.
Put your cursor after the <div id=”nova”> tag and press Enter (Return).
4.
Enter the following code:
<video controls=”controls” width=”470” height=”264”>
<source src=”assets/nova.mp4” type=”video/mp4; codecs='avc1.42E01E,
mp4a.40.2'” />
<source src=”assets/nova.webm” type=”video/webm;
codecs='vp8, vorbis'” />
<source src=”assets/nova.ogv” type=”video/ogg;
codecs=&quot;theora, vorbis&quot;” />
</video>
5.
Save your file.
6.
In your browser, open tpa_nova.html and click the play button to view the video, shown in
Figure 25-6.
Search WWH ::




Custom Search