What is Audio Tag in HTML 5? What are its attributes?

What is Audio Tag in HTML 5? What are its attributes?

1 Like

The <audio> tag is used to embed sound content in a document, such as music or other audio streams.

The <audio> tag contains one or more <source> tags with different audio sources. The browser will choose the first source it supports.

The text between the <audio> and </audio> tags will only be displayed in browsers that do not support the

There are three supported audio formats in HTML: MP3, WAV, and OGG.

Usage example:

<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>