audio

FilterElements

<audio> ... </audio>

HTML5 only. 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.

Notes

There is still debate regarding the supported audio format for the audio element (mainly open source Ogg Vorbis versus proprietary, yet more popular, formats such as .mp3). It is currently supported by Firefox 3.5+, Safari 3.2+, and Opera 10.0+. Chrome support is upcoming. Internet Explorer has not published plans to support audio.

Start/End Tags

Required/Required

Specifications

  • HTML5

autobuffer

Values: None in HTML. autobuffer="autobuffer" in XHTML.
Tells the user agent (browser) that the media file is likely to be used and should be readily available

autoplay

Values: None in HTML. autoplay="autoplay" in XHTML.
Plays the media file automatically

controls

Values: None in HTML. controls="controls" in XHTML.
Indicates that the user agent (browser) should display a set of playback controls for the media file

loop

Values: None in HTML. loop="loop" in XHTML.
Indicates that the media file should start playing again automatically once it reaches the end

src=

Values: URL
Specifies the location of the media file

See also source

<audio src="beep.mp3" controls>
  This browser doesn't support <code>audio</code> elements.
</audio>

Rendered Example