Play a sound:
The <audio> tag is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.
Note: Internet Explorer 8 and earlier versions, do not support the <audio> tag.
The <audio> tag defines sound, such as music or other audio streams.
Currently, there are 3 supported file formats for the <audio> element: MP3, Wav, and Ogg:
|Internet Explorer 9+||YES||NO||NO|
The <audio> tag is new in HTML5.
Tip: Any text inside the between <audio> and </audio> will be displayed in browsers that do not support the <audio> tag.
New : New in HTML5.
|autoplayNew||autoplay||Specifies that the audio will start playing as soon as it is ready|
|controlsNew||controls||Specifies that audio controls should be displayed (such as a play/pause button etc).|
|loopNew||loop||Specifies that the audio will start over again, every time it is finished|
|mutedNew||muted||Specifies that the audio output should be muted|
|Specifies if and how the author thinks the audio should be loaded when the page loads|
|srcNew||URL||Specifies the URL of the audio file|
The <audio> tag also supports the Global Attributes in HTML.
The <audio> tag also supports the Event Attributes in HTML.
Your message has been sent to W3Schools.