The HTML video tag is useful when you want to add a video to your web pages. In modern web browsers, adding the video is very easy. You do not need to install any extra plug-in for this. You can add the video by using a <video> tag.
What Is an HTML <video> tag?
An HTML video tag is used to embed video into your web page. The <video> element is used to embed video content in an HTML document without requiring any additional plugin like Flash player.
The text between the video tag is only displayed in the browsers that do not support the video tag.
Note: Keep the HTML file and the video file that you are going to add in the same folder.
Tag-Specific Attributes
Attribute |
Value |
Description |
autoplay |
autoplay |
It specifies that the video should be played automatically. |
controls |
controls |
It shows the default video controls like play, pause, volume etc. |
height |
pixels |
It specifies the height of the video |
loop |
loop |
It specifies that the video will start again, upon reaching the end. |
muted |
muted |
It specifies that the audio should be muted. |
poster |
URL |
It specifies an image to preview before the loading of the video. |
preload |
auto, metadata, none |
It provides a hint to the browser about what the author thinks will lead to the best user experience. |
src |
URL |
It specifies the location of the video file to embed |
width |
pixels |
It sets the width of video’s display area |
Browser Support
Chrome |
Firefox |
IE |
Opera |
Safari |
Mobile |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Get skilled in HTML5 and CSS3 with the Full Stack Java Developer Master's Program. Click to check out the program details!
Would You Like to Become a Full-Stack Developer?
This article on the HTML video tag gave you an insight into how you can add a video to your web page. Now that you know the various attributes of the video tag, you can take a step further and learn more about web development. Simplilearn’s Full Stack Developer Master’s Program Is highly recommended and could act as a catalyst for your coding career. The course will give you the essence of front-end, middleware, and back-end Java web developer technologies. You will learn to build an end-to-end application, test and deploy code, store data using MongoDB, and much more.
If you’re an aspiring web and mobile developer, HTML training will broaden your skills and career opportunities. And in case you have any questions for us, mention it in the comments section, and we'll have our experts answer it for you.