Name
audio
Synopsis
<audio> . . . </audio>
Not in HTML 4.01. Embeds a
sound file media in the web page without requiring a
plug-in. The content of the audio element can be
used by agents that don’t support the element. The audio file may be
provided with the src attribute. More commonly,
because different browsers support different audio formats, a series
of file format options are provided with source
elements contained in the audio element. Other
fallback content may be provided in the audio
element for nonsupporting browsers.
There is still debate regarding the supported audio format for
the audio element. No file format is supported by
all browsers. As of this writing, browser support for available file
formats is as follows:
IE 9+ (versions prior to
9 do not support the audio element): MP3, MP4,
and WebM |
| Chrome 5+: MP3, MP4, WAV, Ogg Vorbis, and WebM |
| Firefox 3.5+: WAV, Ogg Vorbis, and WebM (4+). MP3 and MP4 support will be added to Firefox but only when a third-party decoder is available. |
| Safari 4+ and Mobile Safari 3+: MP3, MP4, and WAV |
| Android (2.0+): MP3, WAV, Ogg Vorbis, and WebM (2.3.3+) |
Usage
- Categories:
Flow content, phrasing content, embedded content, interactive content (if it has a
controlsattribute), palpable content (if it has acontrolsattribute)- Permitted contexts:
Where embedded content is expected
- Permitted content:
Transparent content, containing either a
srcattribute or one or moresourceelements, followed by either flow content or phrasing content.videooraudioelements ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access