Home > Web Front-end > Front-end Q&A > What is loop in html5

What is loop in html5

WBOY
Release: 2022-06-06 17:09:54
Original
3575 people have browsed it

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" />
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template