There are two tags for adding sound to your document, Internet Explorer 3.0's <BGSOUND> tag and Netscape's <EMBED> tag. The <BGSOUND> play the background sound from your page. That is when visitor visit your page, the sound will automatically play. Netscape's <EMBED> tag is slightly different, you can use its attribute to select playing sound when the page is loaded or give the users an option to click whether they would like to hear the sound.


<EMBED SRC=your_file.mid AUTOSTART=true WIDTH=144 HEIGHT=60 LOOP=1>


AUTOSTART=true means automatically play sound when document is loaded. This
way, the sound will play as a background sound. You can also set the value to false. The sound will play when the "play" button is clicked.
LOOP=n This tells browser how many times to play sound. n could be an integer, true, or false. Setting LOOP=true, browser will continue playing your sound until the stop button on the console is clicked.
WIDTH and HEIGHT This is how the sound control (console) will be displayed. Setting them as the given numbers, browsers will display a full console. Setting the width=0 and height=2, the console will not displayed by the browsers. Other values that too small will cause the browsers display uncompleted image. You might also hide it by placing HIDDEN=true like this:


<EMBED SRC=your_file.mid AUTOSTART=true HIDDEN=true LOOP=1>


It's a good idea to give an alternative to people who using browsers that do not support the embedded sound. Here is what I did on this page:


<embed src="bgsound.mid" hidden="true" autostart="true" loop="1">
<noembed>Your browser doesn't support EMBED, but you can still listen to the background sound of this page by<a href="bgsound.mid"> clicking here.</a></noembed>


Browsers that do not support EMBED will display the link inside <noembed> tag.
Here is how to use <BGSOUND> tag:


<BGSOUND SRC=your_file.mid LOOP=1>


LOOP can be specified as any positive number, infinite, or -1 which equals infinite.