HTML - Audio
Overview
Estimated time: 15–20 minutes
Provide supported audio formats and avoid autoplay with sound.
Example
<audio controls preload="metadata">
<source src="sound.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Try it
Common Pitfalls
- Looping or autoplaying audio unexpectedly.