The <audio>
tag is used to embed sound content in a web page. It can play formats like MP3, WAV, and OGG.
Try it yourself
Attribute |
Description |
---|---|
controls |
Displays audio controls like play, pause, volume, etc. |
autoplay |
Starts playing the audio automatically (muted by default). |
loop |
Loops the audio when it ends. |
muted |
Mutes the audio by default. |
preload |
Specifies how the audio should be loaded (none, metadata, auto). |
Format |
MIME Type |
---|---|
MP3 |
audio/mpeg |
OGG |
audio/ogg |
WAV |
audio/wav |
Try it yourself
Try it yourself