The HTML <audio> element is used to add audio to web page. To add an audio player, add the controls attribute.
The following three audio formats are supported in HTML − MP3, Wav, and Ogg.
Example
You can try to run the following code to add an audio player to an HTML web page
<!DOCTYPE html> <html> <head> <title>HTML audio Tag</title> </head> <body> <p>Click on Play button...</p> <p>(Song: Kalimba which is provided as a Sample Music in Windows)</p> <audio controls> <source src = "/html/Kalimba.mp3" type = "audio/mpeg"> </audio> </body> </html>