web training room for online courses
Online Training for Asp.net MVC Web Designing Development, MS SQL, Digital Marketing

HTML5 audio element

Syntax for Single Audio File
<audio src="~/sound/file1.mp3" controls="controls" />

Syntax for Multiple Audio Files

 <audio controls="controls" autoplay="autoplay" loop="loop">
<source src="~/sound/file1.mp3">
<source src="~/sound/file2.mp3">

Here are few important attributes for audio

attribute description
src this property is for setting up the file source, like source src="~/suound/file1.mp3"
autoplay autoplay="autoplay", This Boolean attribute specifies that if the audio will automatically start playing, the value is "autoplay" which means "true".
controls controls="controls", Indicates browsers will display the control, that will allow the user to control audio play/pause, volume etc.
loop loop="loop", Indicates that audio will automatically start over again
muted muted="muted", if the property value set to muted then, then the audio will be muted when loaded for the first time
Useful HTML5 Elements

HTML5 is very demmanding skill for Web Developer or Web Designer

Name Email Website
Audio Tag in HTML5