Categories
Blog

🎵 Background Music on a HTML Page

Trying to play background music on a HTML page.

Autoplay needs to be enabled in your browser.

BTW, this is the HTML code:

<audio src="../audio/file-name.mp3" autoplay loop></audio>

Music:

Snow Cakes with Friends. CC0 via Chosic

Update:

Sometimes the music is not playing, after I migrated to WordPress. The HTML code itself is valid, if you wanna try it. It worked fine for me when my site was written in HTML directly.