Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

HTML <audio> loop Attribute

The loop attribute on an <audio> tag specifies that the audio file will play repeatedly.

This will continue until stopped.

Example

#

A loop attribute on an <audio> element.
The audio will play over and over -- until it is stopped.

<audio controls loop>
  <source src="/media/epic.mp3" type="audio/mpeg">
  <source src="/media/epic.wav" type="audio/wav">
</audio>

Using loop

The loop attribute specifies that the audio file will play repeatedly.

Once the audio reaches the end, it jumps to the start and begins all over again.


Syntax

<audio loop>

Browser support

Here is when loop support started for each browser:

Chrome
4.0 Jan 2010
Firefox
3.5 Jun 2009
IE/Edge
9.0 Mar 2011
Opera
11.5 Aug 2011
Safari
4.0 Jun 2009

You may also like

 Back to <audio>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides