An audio player:
![]()
The src attribute is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari. However, the file format defined may not be supported in all browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <audio> tag.
The src attribute specifies the location (URL) of the audio file.
The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.
To play the audio file in Internet Explorer and Safari, we must use an MP3 file.
To make it work in all browsers - use <source> elements inside the <audio> element. <source> elements can link to different audio files. The browser will use the first recognized format:
The <audio> tag is new in HTML5.
| Value | Description |
|---|---|
| URL | The URL of the audio file. Possible values:
|
HTML <audio> tag
Your message has been sent to W3Schools.