HTML · HTML Media · Lesson 47
HTML Video
Play videos with <video>.
The HTML <video> element is used to show a video on a web page.
Example
<video width="320" height="180" controls>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
controlsadds play, pause and volume controls- Multiple
<source>elements let the browser pick the first format it supports - Text between the tags is shown only in browsers that do not support video
autoplaystarts automatically — addmutedfor it to work in most browsers
| Format | Media type |
|---|---|
| MP4 | video/mp4 |
| WebM | video/webm |
| Ogg | video/ogg |
Keep reading “HTML Video”
Sign up to read the full lesson, try every example in the live editor, and take the 5-question quiz.