How To Play Audio File With HTML
Surprisingly, it’s quite simple to play an audio file on a website using HTML code. The main element I was concerned about was the user’s freedom to start the clip over and to fast forward / rewind.
First, make sure the audio file is either in a .wav or a .mp3 format.
Next, enter this segment of code into your html:
You can change the width and height attributes. Also, you can have it autoplay and loop by changing the booleans.
After you are finished, a player looking like the one below should appear on your website