HTML: The Markup Language

audioaudio stream NEW # T

An audio element represents an audio stream.

Permitted content #

Transparent, with the following specific structure:

a src attribute, or zero or more source elements followed by flow content

or

a src attribute, or zero or more source elements followed by phrasing content

Permitted attributes #

Descriptions for attributes specific to this element #

autoplay = "autoplay" or "" (empty string) or empty
Instructs the UA to automatically begin playback of the audio stream as soon as it can do so without stopping.
preload = "preload" or "" (empty string) or empty
Instructs the UA that downloading the entire audio stream optimistically is considered worthwhile.
controls = "controls" or "" (empty string) or empty
Instructs the UA to expose a user interface for controlling playback of the audio stream.
loop = "loop" or "" (empty string) or empty
Instructs the UA to seek back to the start of the audio stream upon reaching the end.
src = URI
The URL for the audio stream.

Additional constraints and admonitions #

Tag omission #

An audio element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements, any element that can contain flow elements

DOM interface #

[NamedConstructor=Audio(),
 NamedConstructor=Audio(in DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {};