html tutorial - loop Attribute in HTML - html5 - html code - html form




 loop attribute in html

Learn html - html tutorial - loop attribute in html- html examples - html programs

  • The loop attribute is used to defines the audio/video will start over again, every time it is reaching the end of the audio/video.
  • The loop attribute is a Boolean attribute.

Syntax for loop attribute in HTML:

<element loop>

Difference between HTML 4.01 and HTML 5 for loop Attribute:

HTML 4.01

HTML 5

Applies To:

Elements Attribute
<audio> loop
<video> loop

Sample Coding for loop Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
    <head>
       <title>Wikitechy HTML loop attribute</title>
    </head>
    <body>
        <video width="300" height="300" controls loop>
            <source src="hibiscus.mp4" type="video/mp4">
        </video>
    </body>
</html>

Code Explanation for loop Attribute in HTML:

loop Attribute Code Explanation

  1. <video> tag is used to display the video.
  2. loop is an attribute, which describes that video will start again, if it is reach the end of the video.
  3. src is an attribute, which describes the URL of the hibiscus.mp4 video file.

Output for loop Attribute in HTML:

loop Attribute Output

  1. The video file has been displayed with the video controls and its starts again, every time it is reaching the end of the video.

Browser Support for loop Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to loop Attribute in html