The <video>
element
Creates a video player embedded in the web page and loads a video to play in it.
Full list of attributes
All the usual HTML global attributes are available
autoplay
- If present, indicates that the browser should automatically start the video playback as soon as it has buffered enough of the file to make smooth playback likely.
controls
- Enables the browsers standard set of controls to allow the user to control playback.
crossorigin
- A CORS settings attribute for video files from third party sites.
height
- The height, in CSS pixels, to make the video playback region.
loop
- If present, the video playback will automatically loop back to the start when it reaches the end of the video file.
mediagroup
- Used for synchronizing playback of multiple audio and video streams. The browser will link all
<audio>
and<video>
elements that have the samemediagroup
name. muted
- If present, the audio output will be muted to begin with, but the video will still be shown.
poster
- The URI of an image file to be displayed to the user before the video itself has been downloaded.
preload
- Hint to the browser about how aggressively it should start downloading the video file before it's actually needed.
src
- The URI of the video file to load.
width
- The width, in CSS pixels, to make the video playback region.