HTML AUDIO: HTML5 provides a method to embed the audio file into a webpage by using HTML5.
Before HTML5 audio files is used to play on the browser with the help of plug-ins such as flash etc.
Syntax:
1 2 3 4 5 |
<audio controls> <source src="address" type="file type"> </audio> |
Example:
1 2 3 4 5 |
<audio controls> <source src="johny-johny.mp3" type="audio/mp3"> </audio> |
Output:
1 2 3 |
<audio controls="controls" data-mce-fragment="1"></audio> |