The <video> tag is added in HTML5 along with its sibling, <audio>. Before the release of HTML5, a video could only be played in a browser with a plug-in (like a flash). The HTML5 <video> element specifies a standard way to embed a video in a web page. That is to say that the video is identified by adding a video URL to a source attribute. One can use it to embed videos imported from the computer or hosted by an external website.
For the basic use, all we need to do in an HTML document is to add the video URL to the element by using the <source> element to identify the video URL and to add the controls attribute so that website visitors can control video options. It is also important to use the width and height attributes to set the size of the video. Let’s see a simple example.
<!DOCTYPE html>
<html>
<head>
<title>Title of page</title>
</head>
<body>
<video width="320" height="240" controls>
<source src=”http://techslides.com/demos/sample-videos/small.ogv” type=video/ogg>
<source src="video.mp4" type=video/mp4>
</video>
</body>
</html>