HTML AUDIO <audio> Tag
The AUDIO <audio> tag was introduced in HTML 5. The <audio> element is used to embed audio content like sounds, such as music or other audio streams in an HTML document.
The <audio> tag is written as <audio> </audio>. The audio tag used some attribute like autoplay, controls, loop, muted, preload and src.
Currently, HTML5 supported 3 type file formats for the <audio> element:
Any text inside the between <audio> and </audio> will be displayed in browsers that do not support the <audio> tag.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> HTML Audio Tag </title> </head> <body> <h1> The audio tag </h1> <audio controls> <source src="audio.ogg" type="audio/ogg"> <source src="audio.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> </body> </html>
Waiting for your comments