HTML <audio> loop attribute

Definition and Usage

loop The attribute is a boolean attribute.

If this attribute is set, it specifies that the audio will restart after each end.

Example

Song that restarts after each end:

<audio controls loop>
  <source src="horse.mp3" type="audio/mpeg">
  <source src="horse.ogg" type="audio/ogg">
  Your browser does not support the audio tag.
</audio>

Try It Yourself

Syntax

<audio loop>

Browser Support

The numbers in the table indicate the first browser version to fully support this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
4.0 9.0 3.5 4.0 11.5