You can use the autoplay attribute to play a video automatically in HTML 5
- Place the autoplay attribute within the video element
- Once the browser loads the page the video will start playing automatically
- If you want the video to autoplay without sound, add the muted attribute also
- If you don't want the user to have control while autoplay, do not put controls attribute
Here is an example:
HTML autoplay video
<video width="712" height="374" autoplay muted>
<source src="/videos/sample.webm" type="video/webm">
</video>