Home >Web Front-end >HTML Tutorial >Html5 audio_html/css_WEB-ITnose
Currently, the audio element supports three audio formats:
Ogg Vorbis | √ | √ | √ | ||
MP3 | √ | √ | √ | ||
Wav | √ | √ | √ |
Eg.
<audio controls="controls"> <source src="song.ogg" type="audio/ogg"> <source src="song.mp3" type="audio/mpeg">Your browser does not support the audio tag.</audio>
autoplay | autoplay | If this attribute appears, the audio will be played as soon as it is ready. | |||||||||||||||
controls | controls | If this attribute appears, displays controls, such as a play button, to the user. | |||||||||||||||
loop | loop | If this attribute is present, playback will restart whenever the audio ends. | |||||||||||||||
preload | preload |
| |||||||||||||||
src | url | The URL of the audio to be played. |