How to play background music or sound to your Blogger blog
|
Login to your Blogger blog and then choose the blog where you wish to add your background music. Next go to Layout, choose “add a gadget”, select HTML/JavaScript gadget and then add the below line.
Now in source src=”” add your music file location, save the gadget and then view your blog where you can hear the music playing, but the controls are hidden. In the above code “autoplay” starts to play the sound as soon as it is ready and “loop” will make the audio to repeat every time when it is finished.
If you would like to show audio controls for your visitors then just add controls inside the audio tag just like this.
The audio player looks like..

If you wish to add a music player or make music to play in just single post or page, then you can add it only in that particular page. The audio player control doesn’t fits your blog sidebar, say you want to increase the player width. To do so add an id inside the tag like this <audio id=”player”controls autoplay loop> then add a CSS like this
That’s it! Hope that helped you to add background music to your blog.