Active Web Hosting Logo


Adding Background Sound and Music

You can add background music to your web page by simply putting the following code in between the <head> and </head> tags in your HTML file:

<embed src="audiofile.wav" autostart="true" hidden="true" loop="0">
<bgsound src="audiofile.wav" loop="infinite">


The item in between the quotation marks after src= should be the path to your music or audio file.

autostart="true" means to start the music when the web page loads.

hidden="true" means to hide the sound interface. Sometimes it is nice to set this to "false" so that users can also turn off the sound if they choose. This should be set to "false" also if you do not have autostart set to true.

loop is how many times to play the music. A value of "0" or "infinite" means to repeat the sound clip or music indefinitely.

Some Things To Consider:

When adding sound or music to your web page, you may want to consider the following:

  • The size of your file should be as small as possible. This is so that those on dial-up connections will not have to wait to load your entire page, and also so that you do not slow your site down due to high bandwidth.

  • Some people may have sound turned down or off, either on their computer, speakers or web browser. Not everyone may hear the music.

  • Depending on the file format, some music or sound files may not play at all in some or most web browsers. Some files may require a plug-in in order for the sound file to play. Generally, .wav files are played by all browsers. Some browsers also automatically play .mp3 files.

  • Please be sure that you own the sound clip or music, or have permission to use it on your site. Any site that is caught with copyright material that the site owner does not have permission to use may have their domain taken offline until the sound or music file is removed. For more information, please see Allowable Content & Files.

  • You can place sound and movie files on your web server space, but not on your CGI server. For more information please see File Types Allowed On The CGI Server.

 


Home - Support - Management - About Us
... Active Web Hosting, 1445 American Pacific Dr. Ste 110-318, Henderson, NV 89074 ...
Toll-Free (800) 946-7764   Fax: (702) 567-1831