Advertisement
Home Open Editor ❯

HTML <audio> loop Attribute

Example

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

Try this code ❯

Meaning

The loop is boolean attribute, if present, indicates that the audio should loop.


Standard Syntax

<audio loop>
  <source src="Source(URL)" type="mediaType">
  Your browser does not support the audio tag.
</audio>


Advertisement

Attribute Values

Value Description
loop This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
Home Open Editor ❯
Advertisement