HTML Basics

Sounds

1. How do I add background music to my web page?

Use this tag:

<.embed src="name.mid">

The name.mid would be replaced with the name of your sound file. We recommend using midi rather than wav files as they're much smaller and won't slow the downloading of your page. Be sure to upload the file to keyword MYPLACE as a binary file.

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

2. How do I add links to sounds that play when clicked?

Use this tag:

<.A HREF="sound.xxx">Click here to hear sound<./A>

Replace "sound.xxx" with the name of your sound file and make sure to upload the file at keyword MyPlace using the same sound.xxx name used in your tag (case counts) and selecting "binary" as the file type.

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

3. How do I make sound work in every browser?

Many different browsers and plug-ins are available making it difficult to find sound code that works well across the board. What you'll find below are versions of code that we've found to be relatively successful.

 

Here is some Java script that we've found works relatively well:

For a background sound that works for AOL and MSIE (versions before 3.02) users:

<.BGSOUND SRC="sound.mid" LOOP=infinite>

Upload your sound at MY PLACE and use the same name in the above TAG.

 

For a background sound that works for Netscape users AND MSIE version 3.02 and higher:

<.EMBED SRC="sound.mid" HIDDEN=TRUE AUTOSTART="true" LOOP="true">.

For sound that will play for both MSIE and Netscape users:

<.script language="JavaScript">//

<.!-- Compliments Of On The Net Forum-AOL //

if (navigator.appName == "Netscape") { //

document.writeln('<.embed src="yourfile.mid" hidden="true" autostart="true" loop="false">'); } // --> //

<./script>

<.bgsound src="yourfile.mid" loop="1">

Replace "yourfile.mid" with the name of your sound file,

it can be a WAV or MID file.

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

-------------------------

Top of page