"."/> ".">

Home  >  Article  >  Web Front-end  >  What is loop in html5

What is loop in html5

WBOY
WBOYOriginal
2022-06-06 17:09:543543browse

In HTML5, loop is an attribute used to specify whether to restart playback after the audio or video ends. It means loop; this attribute is a Boolean attribute. If this attribute is set, the audio or video will loop. Play, the syntax is "".

What is loop in html5

The operating environment of this tutorial: windows10 system, html5 version, Dell G3 computer.

What is loop in html5

  • The loop attribute specifies that playback will restart when the audio ends.

If this property is set, the audio will play in a loop.

  • The loop attribute specifies that playback will restart when the video ends.

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

The syntax is;

<audio loop="loop" />

The example is as follows:

<!DOCTYPE HTML>
<html>
<body>
<video controls="controls" loop="loop">
  <source src="../i/movie.ogg" type="video/ogg" />
  <source src="../i/movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</body>
</html>

Output result:

What is loop in html5

(Learning video Share: css video tutorial)

The above is the detailed content of What is loop in html5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn