Skip to content
← Back to Community
How do I make BG Music (autoplay) without showing the annoying thing?
Profile icon
SenorKeps

When I try to enter the correct code for the Audio tag to try to make it loop, autoplay and hide but it doesn't work. I've looked from a variety of tutorials and even from my past work in a different coding website, it didn't work. No autoplay, no invisibility, no loops.

So, here's my code:

Voters
Profile icon
SenorKeps
Profile icon
RichIto
Comments
hotnewtop
Profile icon
ch1ck3n

style.css:

audio {display: none;}
Profile icon
SenorKeps

thx but do you know how to autoplay? (and loop if you can) I've seen w3schools & overflow questions but doesn't work on repl. could you show me the working html code for that too?

Profile icon
ch1ck3n

@SenorKeps it's just you misspelling it, you have an extra space

<source src="The New Order_ Last Days of Europe Soundtrack — Burgundian Lullaby (320 kbps) (cdn.quickmp3converter.com).mp3">
Profile icon
SenorKeps

sorry to ask @ch1ck3n , but it still doesn't work. how do I autoplay this code?

Profile icon
ch1ck3n
Profile icon
SenorKeps

how do you make it autoplay, like when you press "Run" it already starts playing in replit, like having to do it manually