You are here: Reference > HTML > attributes > loop (bgsound, img, input:image)

loop attribute (bgsound, img, input:image)

Browser support:
Specifies the number of repeats for a sound or video clip.
JavaScript page for this attribute: loop. You can find other example(s) there.

Possible values:

The 'infinite' string contant or an integer that sets the number of repeats.
One of the following values:
infinite
Repeats infinitely.
-1
Repeats infinitely.
0
Repeats only once.
repeatCount
Positive integer, the number of repeats.
Default: 1.

Example HTML code 1:

This example illustrates the use of the loop attribute:
<bgsound id="myBgSound" src="budgie.wav" loop="0">
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content