HTML Tutorial

The language for building web pages.

HTML Audio

HTML Audio

The HTML <audio> element is used to play an audio file on a web page. It supports MP3, WAV, and OGG formats.

Audio Attributes:

  • controls - Show audio controls
  • autoplay - Auto start
  • muted - Start muted
  • loop - Repeat
  • preload - auto/metadata/none

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics