HTML 5 Audio Tag
The audio element is used to play sound files or an audio stream in HTML pages.
Audio Element Attributes:
- <html>
- <body>
- <audio controls="controls">
- <source src="one.ogg" type="audio/ogg" />
- <source src="two.mp3" type="audio/mpeg" />
- Your browser does not support the audio element.
-
- </audio>
- </body>
- </html>
autoplay: It specifies that the audio will start playing as soon as it is ready to play and its value is "autoplay"
loop: It specifies that controls that the audio will start playing again when it reaches the end.
preload: The audio will be loaded at page load and ready to run.
url: specify the URL of the audio.
control: It is used for adding play, pause, and volume controls.