Our Top Courses
- Purpose: HTML Audio Tag is used to embed audio content within an HTML document.
- Tags: <audio>
- Attributes
- src: Specifies the URL or path to the audio file.
- controls: Displays default audio controls (play, pause, volume, etc.) to the user.
- autoplay: Starts playing the audio automatically when the page loads. (Note: This attribute may be restricted by browsers due to user experience concerns.)
- loop: Makes the audio loop indefinitely.
- muted: Mutes the audio by default.
- Example:
<audio src="audio.mp3" controls></audio>
Result