Share on Google+Share on Google+

HTML5 audio loop, Use of loop attribute of audio tag in  HTML5.

Use of loop attribute in audio tag.

HTML5 audio loop, Use of loop attribute of audio tag in  HTML5.


Loop attribute is used for reputation of audio or music. It repeats audio file again, until you do not click any controls. It supports only Boolean value either true or false. If it is available in audio tag, music file will be repeated automatically.

loop attribute:
Attribute Value Description
loop Boolean If it is presented in audio tag. Music will repeat itself again and again.

Declaration Syntax :

Declaration syntax of loop attribute  in HTML5.

                       <audio src="URL" controls loop>Content</audio>

Example of  loop attribute in HTML5:

<!DOCTYPE html >
<html >
<title>Title of document</title>
<p><b>Audio tag Example.</b></p>
<p><b>Implementation of loop attributes in HTML5.</b></p>
<audio src="a1.mp3" controls loop >
Browser does not support audio tag.

Download this code

Difference Between HTML5 and HTML4.01:

It is new. It is not present in HTML4.01.


Posted on: September 4, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null