HTML Video Tag
HTML 5 supports <video> tag also. The HTML video tag is used for streaming video files such as a movie clip, song clip on the web page.
Currently, there are three video formats supported for HTML video tag:
Let's see the table that defines which web browser supports video file format.
| Internet Explorer
| Google Chrome
| Mozilla Firefox
| Apple Safari
Android also supports mp4 format.
HTML Video Tag Example
Let's see the code to play mp4 file using HTML video tag.
Test it Now
Let's see the example to play ogg file using HTML video tag.
Attributes of HTML Video Tag
Let's see the list of HTML 5 video tag attributes.
|It defines the video controls which is displayed with play/pause buttons.
|It is used to set the height of the video player.
|It is used to set the width of the video player.
|It specifies the image which is displayed on the screen when the video is not played.
|It specifies that the video will start playing as soon as it is ready.
|It specifies that the video file will start over again, every time when it is completed.
|It is used to mute the video output.
|It specifies the author view to upload video file when the page loads.
|It specifies the source URL of the video file.
HTML Video Tag Attribute Example
Let's see the example of video tag in HTML where are using height, width, autoplay, controls and loop attributes.
Test it Now
MIME Types for HTML Video format
The available MIME type HTML video tag is given below.