HTML Audio Tag

The HTML <audio> tag is used to embed an audio content on the website by containing one or more audio sources with <source> tags.

The <audio> tag supports MP3WAV, and OGG audio content.

File FormatMedia Type
MP3audio/mpeg
OGGaudio/ogg
WAVaudio/wav

Demo

<audio controls>
  <source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Output

   Your browser does not support the audio element.

Note: To display the audio player correctly, the controls attribute need to be added to play, pause or changing the volume of the player.

Browser Compatibility

BrowserChromeEdgeFirefoxOperaSafari
<audio>YesYesYesYesYes