HTML <video> loop attribute

Definition and Usage

loop The attribute is a boolean attribute.

When this attribute exists, it specifies that the video will restart every time it ends.

Example

Video that starts over after each end:

<video controls loop>
  <source src="shanghai.mp4" type="video/mp4">
  <source src="shanghai.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

Try It Yourself

Syntax

<video loop>

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
4.0 9.0 11.0 3.1 11.5