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 .
Open your text editor.
From the Lesson_25 folder, open tpa_nova.html .
Put your cursor after the <div id=”nova”> tag and press Enter (Return).
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;” />
Save your file.
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