Why new audios are not working in HTML? | SoloLearn: Learn to code for FREE!


Why new audios are not working in HTML?

4/7/2020 4:49:50 AM

Vishal Lakhukale

6 Answers

New Answer


You need to link the actual file. Such a file ends with . mp3 or .ogg.


Share your code and we could try to help!


<audio src="https://www.mediafire.com/download/cr0ne9wvxihykyi" control> Audio element not supported by your browser </audio> This is not working


You are not selected audio file try this <audio controls src="https://file-examples.com/wp-content/uploads/2017/11/file_example_WAV_1MG.wav"> </audio>


hi, do you need an appropriate file for embeded a audio file like Zachary suggested. However if you don't find your own audio .mp3 or ogg you can upload in some free hosting site like https://www.000webhost.com/ and after you can put the url in your code Html. p.s Remeberuse the correct syntax of the code to have a good result. <audio src="yourfileaudio.mp3" controls></audio>


hello,Vishal Lakhukale please try this code for audio <!DOCTYPE html> <html> <head> <title>home </title> </head> <body> <center> <h1> Press this button for sound </h1> <audio id="music"> <source src="beep.mp3" type="audio/mpeg"> </audio> <button onclick="bell()"> Press Here</button> </center> <script type=""> var audio =document.getElementById("music"); function bell() { audio.play() } </script> </body> </html> i hope above information will helpful for you. this program is just for your understanding