Play sound file in a web-page in the background

<audio src="https://stackoverflow.com/music/good_enough.mp3">
<p>If you are reading this, it is because your browser does not support the audio element.     </p>
</audio>

and if you want the controls

<audio src="https://stackoverflow.com/music/good_enough.mp3" controls>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>

and also using embed

<embed src="https://stackoverflow.com/music/good_enough.mp3" width="180" height="90" loop="false" autostart="false" hidden="true" />

Leave a Comment