In this article we are going to explain what is audio tag in html or why use audio tag in HTML or how to play music in html with example.


HTML audio tag is used to define audio on an HTML document such as music and other audio clips. Currently there are three supported file format for HTML 5 audio tag.

  1. mp3
  2. wav
  3. ogg

HTML5 supports <video> and <audio> controls. The Flash, Silverlight and similar technologies are used to play the multimedia items.

Example of HTML audio code

 <!DOCTYPE html>
    <title>This is the example of audio tag</title>     
    <audio controls="controls">
        <source src="PAANI.mp3" type="audio/mpeg" />
        Your browser does not support the html audio tag.




  html audio tag controls

I hope this article will help to you after reading.

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like