HTML - attributes - loop

revision:


Content

"loop" attribute : a boolean attribute to start a video over and over syntax some examples


"loop" attribute : a boolean attribute to start a video over and over

top

When present, it specifies that the video will start over again, every time it is finished.

Applicable: <audio>, <video>, <marquee>, <bgsound>.


syntax

top

<video loop></video>

<audio loop></video>


some examples

top
codes:
                    <video style="margin-left:3vw;" width="320" height="240" controls loop>
                        <source src="../../pics/Wuzhen-20-10_02.mp4" type="video/mp4">
                        Your browser does not support the video tag.
                    </video>
                

Click on the play button to play a sound:

codes:
                    <p class="spec">Click on the play button to play a sound:</p>
                    <audio style="margin-left:3vw;"controls loop>
                    <source src="../../pics/horse.wav" type="audio/wav">
                    Your browser does not support the audio element.
                    </audio>