Page 88 - Computer - 8
P. 88
INSERTING VIDEO
You can add video files to a web page to provide visitors with an extra way of assessing the information.
HTML5 provides the <video> tag to insert a video file in a web page.
Video <video> Tag
The <video> tag is an empty tag. The various attributes of the <video> tag are described below.
Attribute Description Value(s)
src Specifies the URL of the audio file. URL
height Specifies the height of the video player in a web page. value in pixels
width Specifies the width of the video player in a web page. value in pixels
autoplay Plays the video file automatically as the web page loads in the web browser. autoplay
controls Displays controls in the web page to control the video playback. Controls
Lab Activity 7 Experiential Learning
To insert a video file on a web page.
1. Open Notepad and create the HTML document as shown below.
<!DOCTYPE html> 2. Open the HTML document in Microsoft
<html> Edge.
<head> <title> Video in HTML </title> </head>
<style type=“text/css”>
h1 {color: Blue; text-align: center; font-size: 30px}
p {color: red; text-align: left; font-size: 20px}
</style>
<body>
<h1> Describing a Scene </h1>
<p> <b> Describing a scene is a key activity in a
child’s learning process about language and honing
vocabulary and usage. <b> <p>
<p> <b> Here’s an video on Describing a scene. <b> <p>
<video controls=“controls” autoplay=“autoplay”
src=“Animation1.mp4” height=“400px” width=“600px”>
</body>
</html>
The document is displayed. The video playback controls are displayed and the video file plays
automatically.
Knowledge Discovery Subject Enrichment
The <audio> and <video> tags are compatible with some web browsers only. The audio formats currently
supported are .mp3, .wav, and .ogg (.oga). The video formats currently supported are .mp4, .webm,
and .ogg (.ogv).
86