<video>
The video element embeds a media player for video playback in the document.
Syntax
<video src="url" controls></video> Examples
<video controls width="640" poster="/cover.jpg">
<source src="/clip.webm" type="video/webm">
<source src="/clip.mp4" type="video/mp4">
<track kind="captions" src="/caps.vtt" srclang="en" default>
Your browser does not support video.
</video>
Output
Renders a 640px-wide video player with controls, a poster image, and English captions.
Notes
Offer multiple <source> formats for compatibility and always include a <track> for captions. Use muted with autoplay since browsers block sound-on autoplay.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 4.0 |
| firefox | 3.5 |
| safari | 4.0 |
| edge | 12 |