Skip to content
← Back to Community
learn how to add sound with html
Profile icon
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
Profile icon
KICKED18
Profile icon
alexjoeyjunior
Profile icon
KevinWoo4
Profile icon
AmsyarEmir
Profile icon
RABSTICKS
Profile icon
acoder9
Profile icon
wolfIcorn243
Profile icon
NamsukAppakarn1
Profile icon
SSCeorge
Profile icon
AmadouNiang
Comments
hotnewtop
Profile icon
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.

Profile icon
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?