Ask coding questions

← Back to all posts
How do I make BG Music (autoplay) without showing the annoying thing?
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:
<audio src="The New Order_ Last Days of Europe Soundtrack — Burgundian Lullaby (320 kbps) (cdn.quickmp3converter.com).mp3" controls autoplay loop controls=""></audio>

Voters
SenorKeps
Comments
hotnewtop
ch1ck3n

style.css:

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?

ch1ck3n

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

SenorKeps

sorry to ask @ch1ck3n , but it still doesn't work. how do I autoplay this code? <audio src="The New Order_ Last Days of Europe Soundtrack — Burgundian Lullaby (320 kbps) (cdn.quickmp3converter.com).mp3" controls autoplay loop controls=""></audio>

ch1ck3n
SenorKeps

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