Example
A video:<video width="320" height="240" controls="controls"> <source src="/tryit/video/movie.ogg" type="video/ogg" /> <source src="/tryit/video/movie.mp4" type="video/mp4" /> <source src="/tryit/video/movie.webm" type="video/webm" /> Your browser does not support the video tag. </video>
Browser Support
The
<video> tag is supported in all major browsersDefinition and Usage
The <video> tag specifies video, such as a movie clip or other video streams.
Differences Between HTML 4.01 and HTML5
The <video> tag is new in HTML5.
Tips and Notes
Tip: Any text inside the between <video> and </video> will be displayed in browsers that do not support the video element.
Optional Attributes
New : New in HTML5.
| Attribute | Value | Description |
|---|---|---|
| audioNew | muted | Specifies the default state of the the audio. Currently, only "muted" is allowed |
| autoplayNew | autoplay | If present, then the video will start playing as soon as it is ready |
| controlsNew | controls | If present, controls will be displayed, such as a play button |
| heightNew | pixels | Sets the height of the video player |
| loopNew | loop | If present, the video will start over again, every time it is finished |
| posterNew | url | Specifies the URL of an image representing the video |
| preloadNew | auto metadata none | Specifies whether or not the video should be loaded when the page loads |
| srcNew | url | The URL of the video to play |
| widthNew | pixels | 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.
Was this information helpful?

