English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML: <video> loop attribute

Usage of the loop attribute of the <video> element, the loop attribute is a boolean attribute, if it exists, it specifies that the video will restart each time it ends.

 HTML <video> tag

Online Example

Automatically loop the video:

<video controls loop>
  <source src="movie.mp4" type="video/mp4>
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the loop attribute.

Note: Internet Explorer 8 and earlier IE versions do not support the <video> tag.

Definition and Usage

The loop attribute is a boolean (boolean) attribute.

The loop attribute specifies that the video will restart each time it ends.

If this attribute is set, the video will play in a loop.

HTML 4.01 versus HTML5differences

<video> tag is HTML5New tags.

Differences between HTML and XHTML

In XHTML, attributes are not allowed to be abbreviated, and the loop attribute must be defined as <video loop="loop">.

Syntax

<video loop>
 HTML <video> tag