Videos

Videos can be added anywhere within your web page. You will only be asked to display videos that are in your folder, not online videos.

Key Points

Videos are opened using the <video> tag and closed using the </video> tag.

The videos size and controls can be set in the video tag.

An additional line is required to set the source of the video.

Adding a Video

To add a video to your page you must first create the video using a <video> tag.

Inside the video you must set the <source> which sets the location of your video and the videos file type.

Adding a video

<video controls>
    <source src="movie.mp4" type="video/mp4">
</video>

Adding a video that is in a folder

<video controls>
    <source src="videos/movie.mp4" type="video/mp4">
</video>

Adding a video and setting its size

<video width="340" height="240" controls>
    <source src="movie.mp4" type="video/mp4">
</video>

Settings the size of a video

At National 5, you only need to be able to set the height and width of a video using CSS. This can also be done inline as shown above.

video{
    width: 340px;
    height: 240px;
}

National 5 Target

You should be able to add videos to a page and set its size.