With HTML5, we can easily play audio file with the <audio> tag. Here is an example.
<html> <head></head> <body> <audio controls loop autoplay> <source src="music.ogg" type="audio/ogg" /> <source src="music.mp3" type="audio/mp3" /> Your browser does not support the audio element. </audio> </body> </html>
Please note that you have to include both .ogg and .mp3 because .ogg works in Firefox, Opera and Chrome while .mp3 is for Internet Explorer and Safari.