HTML <audio> Tag
Example
Play a sound:
<audio controls>
<source src="ADD YOUR FILE.ogg" type="audio/ogg">
<source src="ADD YOUR FILE.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
<source src="ADD YOUR FILE.ogg" type="audio/ogg">
<source src="ADD YOUR FILE.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
Definition and Usage
The <audio> tag defines sound, such as music or other audio streams.
Currently, there are 3 supported file formats for the <audio> element: MP3, Wav, and Ogg:
Differences Between HTML 4.01 and HTML5
The <audio> tag is new in HTML5.
Tips and Notes
Tip: Any text inside the between <audio> and </audio> will be displayed in browsers that do not support the <audio> tag.
Post a Comment