+ 1

How we add audio in web by html coding ?

how we add audio in web by html coding ? please provide me code for this ..

23rd Sep 2017, 6:31 AM
Ranjan Kumar
Ranjan Kumar - avatar
9 Answers
+ 5
I see you have joined HTML course, the audio element is covered in the HTML5 course, if you keep learning you'll eventually get to it. Here's a copy of the snippet in the HTML5 course: <audio src="audio.mp3" controls> Audio element not supported by your browser </audio> Hth, cmiiw
23rd Sep 2017, 6:41 AM
Ipang
+ 5
Just give it a try bro, you never try, you never know ;)
23rd Sep 2017, 6:54 AM
Ipang
+ 1
can this work in sololearn ?
23rd Sep 2017, 6:52 AM
Ranjan Kumar
Ranjan Kumar - avatar
+ 1
right
23rd Sep 2017, 6:54 AM
Ranjan Kumar
Ranjan Kumar - avatar
+ 1
not working
23rd Sep 2017, 7:07 AM
Ranjan Kumar
Ranjan Kumar - avatar
+ 1
If your audio is in a separate folder to your html. remember to include that in the src attribute value. Can you share your code so we can see why it's not working? Remember that if you're doing it in sololearn that the audio file will have to be hosted online somewhere for people to access it.
23rd Sep 2017, 11:55 AM
JoeJoe
+ 1
Could this work with wav extensions?
9th Oct 2017, 10:16 PM
Pow M. Rigor
Pow M. Rigor - avatar
0
Heres an example. The mp3 file is hosted online using vocaroo. https://code.sololearn.com/W6acQ30pUL0d/?ref=app
23rd Sep 2017, 12:12 PM
JoeJoe
0
Yeah, just set the type to audio/wav
9th Oct 2017, 10:59 PM
JoeJoe