Answers for "autoplay html video and audio"

4

html video autoplay

<!--
Video autoplay in html is a boolean attribute, which plays the video automatically when the video gets loaded on web page.
-->

Syntax:
<video autoplay>
  
Example:
<video controls autoplay>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
</video>
  
<!--
I hope it will help you.
Namaste
Stay Safe Stay Home
-->
Posted by: Guest on May-17-2020
1

html sound autoplay

<audio controls autoplay>
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Posted by: Guest on March-14-2021

Browse Popular Code Answers by Language