![]() |
VOOZH | about |
Web design often has a feature of including a video that starts to play as soon as the web page loads. This effect can be achieved using HTML5<video> element with the autoplay attribute. In this way, videos start playing without any user interaction hence improving the multimedia experience on websites.
<video autoplay controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Example 1: The example below shows how to add an autoplay video in HTML. The <video> tag includes the autoplay and controls attributes, enabling the video to start playing automatically with user controls for playback.
Example 2: The example below shows how to add an autoplay video in HTML with the muted attribute. The <video> tag includes autoplay and muted attributes, enabling the video to start playing automatically without sound.