HTML5 Audio is a subject of the HTML5 specification, investigating audio input, playback, synthesis, as well as speech to text in the browser.
The <audio> element represents a sound, or an audio stream. It is commonly used to play back a single audio file within a web page, showing a GUI widget with play/pause/volume controls.
The <audio> element has these attributes:
global attributes (accesskey; class; contenteditable; contextmenu; dir; draggable; dropzone; hidden; id; lang; spellcheck; style; tabindex; title; translate)
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 = “none” or “metadata” or “auto” or “” (empty string) or empty
Represents a hint to the UA about whether optimistic downloading of the audio stream itself or its metadata is considered worthwhile.
“none”: Hints to the User-Agent that the user is not expected to need the audio stream, or that minimizing unnecessary traffic is desirable.
“metadata”: Hints to the User-Agent that the user is not expected to need the audio stream, but that fetching its metadata (duration and so on) is desirable.
“auto”: Hints to the User-Agent that optimistically downloading the entire audio stream is considered desirable.
controls = “controls” or “” (empty string) or empty
Instructs the User-Agent to expose a user interface for controlling playback of the audio stream.
loop = “loop” or “” (empty string) or empty
Instructs the User-Agent to seek back to the start of the audio stream upon reaching the end.
mediagroup = string
Instructs the User-Agent to link multiple videos and/or audio streams together.
muted = “muted” or “” (empty string) or empty
Represents the default state of the audio stream, potentially overriding user preferences.
src = non-empty [URL] potentially surrounded by spaces
The URL for the audio stream.