HTML and CSS Reference
In-Depth Information
To Add a Video Clip to a Web Page
To add the video file, longfellow-video.mp4, to the longfellow-video.html file, you will use the <video> </video>
container, just as you did for the audio clip, but with different attributes. Table 8-9 shows the code to add the
video clip.
Table 8-9 HTML Code to Add Video Clip
Line
HTML Code
<video width="320" height="240" controls="controls">
24
25
26
<source src="longfellow-video.mp4" type="video/mp4" />
If you are reading this, it is because your browser does not support the HTML5 video element.
27
28
29
</video>
1
HTML code in
longfellow-
video.html file
If necessary, click the
Notepad++ button on
the taskbar.
Open the
longfellow-video.html
file from the
Chapter08\
ChapterFiles folder
(Figure 8-11).
comment on line 24
where object tag is
inserted
Figure 8-11
2
Highlight the words
control panel
will display
<!—Insert the video
statements here -->
on line 24.
height and width
values inserted
no autostart
attribute inserted
Enter the HTML code
shown in Table 8-9
(Figure 8-12).
src attribute identifies
filename to insert
Save the file.•
text that displays if
browser does not
support video element
Figure 8-12
 
Search WWH ::




Custom Search