<audio controls src="somg.mp3">
in here audio tag defines audoo file for the web browser and controls
attribute is boolean attribute that adds control buttons to audio player like play pause and volume.
we can add additional attributes like
autoplay
: autoplay when loading the page
muted
: play audio in muted
loop
: loop audio file and continues playing
we can add backup audio file in case if web browser doesn’t support given audio file. here is how to do that :
<audio controls autoplay>
<source src="audio1.mp3">
<source src="backup.mp3">
This browser doesnt does not support HTML5 audio files
</audio>