HTML <video> Tag


The <video> HTML element 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.


Permitted Parents
Any element that accepts embedded content
<source>, <track>, and text
Start/End Tags
Start tag: required, End tag: required


<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

Browser Support

The following table will show you the current browser support for the HTML <video> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th March 2024