HTML audio Tag
HTML audio Tag
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. We can insert text between these audio tags which will be displayed if the browser does not support the audio element.
Supported Audio formats:-
Browser | MP3 | WAV | OGG |
---|---|---|---|
Edge / IE | YES | YES | YES |
Chrome | YES | YES | YES |
Firefox | YES | YES | YES |
Safari | YES | YES | NO |
Opera | YES | YES | YES |
Attribute information:-
- The control attributes are used to give the user access to play/pause the music along with more functionalities.
- The loop attribute is used to replay the audio automatically.
- The autoplay attribute will play the audio automatically and the user does not need to start it.
Syntax:-
Its syntax is:- < audio >