Skip to content
← Back to Community
Background Music
Profile icon
sn236

How do I add background music in html,css,js. I know there is a tag called , but it stopped working in all the browsers except one(which I don't remember). Language - Html,CSS,Js. Any language out of these 3 would be fine.

Voters
Profile icon
HaithemeBS
Profile icon
sn236
Comments
hotnewtop
Profile icon
ch1ck3n

javascript:

bgmusic = new Audio('music.wav'); bgmusic.play()