Code Example:
<audio controls>
<source src="daydreaming.m4a" type="audio/mp4">
<source src="daydreaming.mp3" type="audio/mpeg">
Your browser does not support HTML5 audio.
</audio>

Object Example:

Audio sample commissioned by Paris Lun and used with permission.
Click here to view this element in the Mozilla Developer Network Click here to view this element in W3Schools

The HTML5 <audio> element is used to provide audio playback in compatible browsers. Supported audio codecs depend on browser support, but AAC, MP3, Ogg Vorbis, and Opus are common formats.

Attributes:
Attribute Value Description
autoplay autoplay Determines whether the audio will play automatically
controls controls Determines whether playback controls will appear
loop loop Determines if the audio will play on a loop
muted muted Determines if playback should start muted
preload auto/metadata/none Determines if the browser will load the audio before it is played
src URL Determines what audio will be played (<source> can be used in place of src; see code sample)


This element supports global HTML attributes.
Click here to view all global attributes