Audio Tag HTML
Audio Tag HTML
Before HTML5 audio could not be added this simple way on webpage. Earlier audio could only
be played using a plug-in like Flash.
If you want to add any kind of audio message,song,tune etc to your web page
then <audio> element can be used.
You can insert one or multiple formats of the same file.The browser will choose the first one
which it will be able to play.
<audio controls>
<source src="piano.ogg" type="audio/ogg">
<source src="piano.mp3" type="audio/mpeg">
Your browser doesn't support audio element.
</audio>
HTML Audio attributes
The <audio> element has few attributes which helps in displaying controls and then control the
audio.
Few of its attributes are Boolean attributes meaning it has as "TRUE" or "FALSE".