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 that define how users interact with the media.
As there are two ways to approach this, the following pages will showcase both:
Single-Source
Use this setup if you only have one version of the audio file, like an MP3.
song.mp3
Multiple-Source
Use this setup if you have multiple versions of the audio file, such as MP3, WAV, OGG, etc.
song.mp3
song.wav
song.ogg
- Previous
- Next