Description:

The HTML <audio> tag is used to specify sound, such as music or other audio streams.

For example, you could embed a music file on your web page for your visitors to listen to.

Example Code:
<audio controls>
<source src="audio/chime.mp3" type="audio/mpeg">
Sorry your browser does not support the audio tag.
</audio>
Result:
Attributes:
Attribute Definition
autoplay Specifies that the audio will start playing as soon as it is ready.
controls Specifies that audio controls should be displayed (such as a play/pause button etc). .
loop Specifies that the audio will start over again, every time it is finished.
muted Specifies that the audio output should be muted.
preload Specifies if and how the author thinks the audio should be loaded when the page loads.
src Specifies the location of the audio file. Its value must be the URI of an audio file.
Global Attributes:

The <audio> tag also supports the Global Attributes in HTML5

Event Attributes:

The <audio> tag also supports the Event Attributes in HTML5



Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.