HTML5 Audio Tag (Advanced)

Use the <audio> tag to add music to your website. To make your website more robust, make sure to provide multiple sources of music (file types) to accomodate various browsers. You may need to use a conversion tool to create the required file types such as .wav, .mp3, and .ogg.

Notice the parameters (attributes) such as controls, autoplay, and loop. These parameters change the way the audio player functions.

Here's an example of the code you will need and the parameters for your audio player. Notice the additional source tags.

<audio controls="controls" autoplay="autoplay" loop="loop">

      <source src="mymix.mp3" type="audio/mpeg">
      <source src="mymix.ogg" type="audio/ogg">
      <source src="mymix.wav" type="audio/wav">


      <!-- info for non supporting browsers -->
     Your browser does not support the audio element.

</audio>

Here's a little help: W3CSchools