How to Stop Autoplay in HTML
Have you ever had the problem of sounds automatically playing when you go to the web page they are on? I have. I had three sounds on my webpage and when I would open the page all three sounds would start playing. Here is the solution to this problem.
Since you already have your sound embedded in your source code, this problem will not be difficult to fix. This is what your source code should already look like.
I underlined the part where I inserted my sound into my source code. Just leaving this in my source code will make the sound automatically start playing when I open my webpage on the Internet.
The next thing you will want to do is add something in that tag to make it not automatically play. Between the width tag and the “src” tag is where you will enter the next key thing as shown below.
In this space you will want to enter “autoplay=false” shown below. This is the tag that will stop your sound from automatically playing when you open your webpage.
Insert this tag into any embedded sound you have in your source code and the sound will not automatically play. That is all there is to it, good luck!