<title> HTML Video </title>
<video width="480" height="320" controls>
<source src="html-video.mp4" type="video/mp4">
Your browser does not support the video tag.
How it Works ?
The controls attribute adds video controls, like play, pause, and volume.
It is a good idea to always include height and width attributes.
If height and width are not set, the page might flicker while the video loads.
The <source> element allows you to specify alternative video files which the browser may choose from.
The browser will use the first recognized format.
Note : The text between the <video> and </video> tags will only be displayed
in browsers that do not support the <video> tag.
HTML Video Formats
Video File Format
HTML Video Attributes
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 is used to mute the video output.
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 specifies the author view to upload video file when the page loads. It is ignored if autoplay is used.
It specifies the source URL of the video file.
HTML Video - Methods, Properties, and Events
HTML5 defines DOM methods, properties, and events for the <video> element.
These Properties and Methods allows you to load, play, and pause videos, as well as setting duration and volume.
The HTML5 <video> element specifies a standard way to embed a video in a web page.
The type attribute defines the format of the video file used.