Audio- Play Music Simply by Few Lines of Code

Written by @m_k_amin 5 June 2013

HTML5 makes it easy to play sounds on the websites. It has a player with the ability to manage the audio files and can be controlled by HTML and JavaScript codes. But be aware of browsers support of this element and their supported audio formats (For more information

Code Snippet:

                                                
                                                <!-- this script is provided by https://www.html5freecode.com coded by: Kerixa Inc. -->
<!-- This Script is from www.html5freecode.com, Coded by: Kerixa Inc-->
<audio controls autoplay loop>
	<source src="http://www.html5freecode.com/files/skylander.ogg" type="audio/ogg">
	<source src="http://www.html5freecode.com/files/skylander.mp3" type="audio/mpeg">
	<p>The browser doesn't support the audio element.</p>
</audio>
<div style="text-align: left"><br><font face="Tahoma"><br><a target="_blank" href="http://www.html5freecode.com"><span style="font-size: 8pt; text-decoration: none">HTML5 Free Code</span></a></font></div><a target='_blank' href='https://www.html5freecode.com' style='font-size: 8pt; text-decoration: none'>Html5 Free Codes</a>                                                
                                            

Example:


About @m_k_amin

This user is pending a biography.

M

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: Afzal, FOTPU
advertisement 2