Audio

The <audio> tag is used to play sound on a webpage.

<audio controls>
    <source src="media/filename.mp3"
    type="audio/mpeg">
</audio>
  • <audio controls> starts the audio player
  • src gives the file location
  • type gives the audio type (there are two options at National 5)
    • audio/mpeg
    • audio/wav
  • </audio> closes the audio element