play background music in html jasvascript
<audio src="https://www.bensound.com/bensound-music/bensound-moose.mp3"></audio>
<Script>
window.addEventListener("DOMContentLoaded", event => {
const audio = document.querySelector("audio");
audio.volume = 0.2;
audio.play();
});
</Script>