After uploading the "Sweet Dreams" template, I was asked how to embed background music in a blog. It's actually quite simple to do this, and there are various methods you can use.
In this post, I'll concentrate on actually embedding the music (rather than adding widgets such as Last.fm playlists). You can see an example of embedded background music here and also further down this page... The easiest method of adding background sound is to include a line like this in your blog template, just after the opening <body> tag:
<bgsound src="http://yoursite.com/yoursound.mp3" loop=infinite>
where the URL is that of the background music you wish to use. This method works perfectly well, but visitors to your site will not be able to switch the music off if it becomes distracting.
So instead, you may prefer to use this method instead, which is compatible with all browsers (press the play icon to start music):
This is achieved by including the following code somewhere in your template (eg: the sidebar):<embed width="200" src="http://yoursite.com/yourmusic.mp3" autostart="false" loop="false" height="50"></embed>You can change some of the variables to suit your needs:
- autostart: set to "true" to make the music begin as soon as the page is loaded, or "false" to ensure the user has to press the play icon
- loop: set to "true" to have the music play over and over, or "false" so that it plays only once.
- height: if this is set to "40", only the play options will be visible. You can make this larger if you prefer, in which case blank space will be visible.
Here are some sites I've used for copyright-free music you could use in your blog:
- FreePlay Music
- MonkeyFilter Wiki: contains links to many sites offering free music downloads.
- FreeSound
Technorati Tags: embed | background+music | mp3 | copyright+free | music | sound | blog



My name is Amanda Fazani and I write Blogger Buster to help other Blogger users make the most of their Blogger blogs.
Post a Comment 12 Comments:
Thanks for another great tip, have to try it. I followed your tips when moving my blog from blogspot domain to custom one, redirecting the opening, creating the favicon. And one more time again when starting another. Your blog was really helpful, so I mentioned it few times at one first posts at tatraplan.com + it is among the links on my older blog f1wolf.com. Thanks again
You're very welcome, F1 Wolf! I'm glad my posts have helped you with your blogs and thank you for your comments :)
Thanks a lot for the tip!
Try this site for some great free tracks for blogs, podcasts etc..
They're all free to use in your blog
Free Music Tracks
That all very good but what if you want songs that are saved in your computer from C.D's or a download site like frost wire
(which i have). I can't seem to get any songs. Please help x
The second method works great if you just paste the embed code into a Java/HTML element; you don't need to put it in the template I found.
Thanks for posting this! One question - is there a way to have multiple songs that play in a random order? Like a playlist in the background? Thanks!
I've been trying to embed just a simple sound clip, I can hear it fine in QT,iTunes, etc. but when I upload it and embed I cant hear it?
Also, on your site I'm not hearing any of the sounds?
All my computer settings are fine..
Hey Amanda!
Thanks a lot for the great tip. Its working perfectly :)
i would like to know what is the link to that music in this page.. it sound like the nut cracker music but i cant find it anywhere. can u please give the link? please and thank you
This is annoying! Its working absoulutley fine but it only plays the first couple seconds of the song!
After following the above mentioned steps, and after I have installed Apple QuickTime, the "Click here to download plugin" (the one with the blue lego like piece) icon appears, as if I had no plugin to play it.
What can I do ?
Many