Loop video in HTML 5

Loop video using HTML 5

Posted by Ervin Adams on July 30, 2022

Loop video in HTML 5

Loop video using HTML 5

Posted by Ervin Adams on July 30, 2022

You can use the loop attribute to play a video automatically in HTML 5

  • Place the loop attribute within the video element
  • If you want the video to autoplay without sound when the browser loads, add the autoplay and muted attribute

Here is an example

HTML loop video

<video width="712" height="374" autoplay loop muted>
   <source src="/videos/sample.webm" type="video/webm">
</video>