Adding background music to your web page can be done in a few simple steps.
Before I go over those steps though, you need to ask yourself if you REALLY want background music on your page. Background music, by definition, is in the background. It cannot be controlled. Which means you are forcing it on everybody that is kind enough to stop by your site. And people don't like having things forces on them.
Imagine going to work and hearing a loud song right as you walked in. Then imagine hearing that same loud obnoxious song EVERY TIME you got to work. Day after day after day. It would get pretty old, right?
So for the most part I would suggest against using a background sound. Other options would be an embedded sound (one that the user can control on the web page) or linking to a sound (which can work a few different ways but at least you are giving your user the choice). Either of these options are better than background music. Really.
Still here? Alright, you cannot be swayed. Don't say I didn't warn you! Here is the very quick and easy 2 step guide to adding background sound or music to your web page.
*1* Between the BODY tags, create a new tag like this: BGSOUND SRC="sound.ext" where sound is the name of your audio file and .ext is the type of extension. You may have to transfer your audio file to an accepted version. I prefer using .wav files on my pages. Midi files also add a little flare.
*2* That is it actually. Make sure your audio file is saved in the same folder as your HTML file and you should hear beautiful music every time you load your page.
*OPTIONS* Here is where you can really drive your page visitors insane! Within the BGSOUND tag, type LOOP=x where x is the number of times you want your sound to play. If you type -1 there, the song will be played over. and over. and over. This is a great way to ensure no one ever comes back to your site again. If you don't add the LOOP tag, then the audio you have on your page will play just once.
So there you have it! The power of the background sound is now in your hands. It is up to you what you will do with it.
Learn more about this author, Tim StS.
Click here to send this author comments or questions.
Below are the top articles rated and ranked by Helium members on:
If you want to know how to add background music, it is assumed that you all ready know how to build a web page without a
by Alex Landis
How to place background music in a webpage:
1. Grab a sound file!
Before you can add music to a webpage, you first need a
by EMoore
Installing background music in your web page is as easy as the next three steps:
1. You select your music file with the music
by Tim StS
Adding background music to your web page can be done in a few simple steps.
Before I go over those steps though, you need
Add your voice
Know something about How to place background music in a webpage?
We want to hear your view.
Write now!
Featured Partner
Founded in January 2006, the mission of the Sunlight Foundation is to strengthen the relationship between lawmakers a...more
hide