HTML5 Audio Element Use




The development of HTML5, AUDIO Element has been introduced for playing the audio file in the browser with full user control support.

We were unable to play a audio file without using the third party browsers plug-in as flash player or quick time. Now the AUDIO Element can be used instead of installing a browser plug-in. 

The AUIDO Element contains an extra child element is called SOURCE, which is used to call the exact media file which we want to be played in the browser. The AUDIO Element can also contains it’s properties for controlling the AUDIO File.

 

Syntax for AUDIO Element


<audio>
     <source src="Place your audio file here with full path" type="audio/mpeg"/>
     <source src="Place your audio file here with full path" type="audio/ogg"/>
</audio>


Previous
Next Post »