Learn to Code via Tutorials on Repl.it!

← Back to all posts
learn how to add sound with html
ck24

first you make a audio tag like this:
<audio></audio>
then add the src after the opening audio tag but inside the tag like this:
<audio src=></audio>
you can't just do that you have to add a link add quotes then inside of them paste the link like this:
<audio src="https://listen.hs.llnwd.net/g3/4/9/2/2/5/1427552294.mp3">
that's basically it. That was easy right? run your code if it doesn't work check your work below:
<audio src="https://listen.hs.llnwd.net/g3/4/9/2/2/5/1427552294.mp3"></audio>
thank you for reading

Voters
RABSTICKS
acoder9
wolfIcorn243
NamsukAppakarn1
SSCeorge
AmadouNiang
AllAwesome497
Comments
hotnewtop
AllAwesome497

Thanks for reading my earlier message and adding more to your guide, but can you provide an example please? Sometimes examples are what help the most, especially to beginners.

AllAwesome497

Can you provide an example of this? And does it play automatically? Or do you have to click something to start it? For beginners, how do you link to a file? What file types are supported?