The <video> element embeds video content into a web page.
<video> |
Yes | Yes | Yes | Yes | Yes |
The <video> tag is new in HTML5.
Attribute | Value | Description |
---|---|---|
autoplay | autoplay | Set that the video will start playing as soon as it is ready |
controls | controls | Set that video controls should be displayed, such as a play/pause button. |
height | pixels | Set the video player height |
loop | loop | Play the video again and again |
muted | muted | Mute the sound |
poster | URL | Set an image while the video is downloading, or until the user hits the play button |
preload | auto metadata none |
what to preload when the page loads |
src | URL | Set the URL of the video file |
width | pixels | Sets the width of the video player |
The <video> tag supports the Global Attributes in HTML.
The <video> tag supports the Event Attributes in HTML.
None.
<!DOCTYPE HTML> <html> <body> <video width="360" height="240" src="your.webm" autoplay controls preload="none" muted> Video cannot be displayed </video> </body> </html>