Add Video in html document

Here we are going to tell you that how can you add video elements in html document. You must have the basic knowledge of html language to understand the given program. You can learn HTML from our HTML Tutorial.

You must have the basic knowledge of html language to understand the given program. Please see our HTML Tutorial.

Click the Button to See Demo


HTML Code to Add Video in html document

<!DOCTYPE html>
<html>
<body>
<video width="500" height="400" controls="controls">
<source src="Hai Preet Jahan Ki Reet.mp4" type="video/mp4" />
</video>
</body>
</html>



Click the Button to See Demo


Code Explanation

Here we are going to explain the above code.See the given lines of code and read the comments in blue to learn the use of these statements:

<!DOCTYPE html>
<html>
<body>
// The next two statements will add the specifie video in the html document.
<video width="500" height="400" controls="controls">
<source src="Hai Preet Jahan Ki Reet.mp4" type="video/mp4" />
</video>
</body>
</html>
That's it..