Learn to Code via Tutorials on Repl.it!

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

first you make a audio tag like this:
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

AllAwesome497 (399)

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 (399)

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?