HTML <video> Tag
The HTML 5 <video> tag is used to specify video on an HTML document. For example, you could embed a music video on your web page for your visitors to listen to and watch.
Any content between the opening and closing <video> tags is fallback content. This content is displayed only by browsers that don't support the <video> tag.
- Example Code:
<video width="300" height="240" controls>
<source src="audio/toy.mp4" type="video/mp4">
Your browser does not support the video tag.
Attribute Definition autoplay Specifies that the video will start playing as soon as it is ready controls Specifies that video controls should be displayed (such as a play/pause button etc). height Sets the height of the video player loop Specifies that the video will start over again, every time it is finished muted Specifies that the audio output of the video should be muted poster Specifies an image to be shown while the video is downloading, or until the user hits the play button preload Specifies if and how the author thinks the video should be loaded when the page loads src Specifies the URL of the video file width Sets the width of the video player
- Global Attributes:
The <video> tag also supports the Global Attributes in HTML5
- Event Attributes:
The <video> tag also supports the Event Attributes in HTML5