The 3-Part Audio Element
If you have your own audio files, the audio element allows you to add a functioning player to your website.
The 3 attributes the audio element should include are:
- The tags themselves.
- The source attribute.
- Other attributes which define how users can interact with the media.
Note As there are two ways to approach this, the following pages with showcase both:
Single-Source
Use this set-up if you only have one version of the audio file, like an MP3.
song.mp3
Multiple-Source
Use this set-up if you have multiple versions of the audio file, like MP3, WAV, OGG, etc.
song.mp3
song.wav
song.ogg
- Previous
- Next