HTML Video Tag
HTML helps us to add multimedia files on your website by providing various multimedia elements like audio, video, embed, and object.
In HTML, the
<video>tag is used to embed a video or a movie clip in a document.
There are three file-format that is supported by
<video>tag with their MIME-Type and these are given below:-
The content inside the opening and closing
<video></video>tags are shown as a fallback in browsers that don't support the <video> tag.
If you don't specify the
Also, this is a Block-Level Element.
<video> Tag Syntax and Usage
<video> element requires the start(opening) tag and end(closing) tag.
The basic syntax for the same is given below:
<video> ....content here </video>
<video> Tag Attribute
<video> tag supports both global and event attributes and some of the common attributes are given below:
This attribute is used to determine the time ranges of buffered media.
This attribute is used to specify the URL for the video.
This attribute is used to set the width of the video on a Web Page.
This attribute is used for displaying the video controls like pause/play buttons on a web page.
This attribute is used to specify the height of the video in pixels in an HTML document.
Autoplay is a boolean attribute; if it is specified, then the video automatically begins to playback as soon as it can do so without stopping to finish loading the data.
It is a boolean attribute and is used to replay the audio files.
This attribute is used to specify how the video should be loaded when the page loads It has three values: auto, metadata, none.
<video> Tag Basic Example
Below we have a basic example to show the usage of
Browser Support for HTML
Google Chrome 4.0
Internet Explorer 9.0
Opera Mini 10.5