Here is how to add sound to the background of your Web Page, so it will play upon entering your page. Netscape & Microsoft's Internet Explorer use different commands for this.
Note: The newer versions of Internet Explorer
support the Netscape sound tag of
<embed src="...">. So it is reccomended you use the Netscape sound
code in your web pages for background sound.
Here are examples of these codes. Using the sound sample.mid provided before.
<EMBED SRC="sample.mid" autostart="true"
hidden="true" volume="100%">
To loop the sound you may addloop="true" for continuous sound. Or loop="number" for the times you would like the sound to play. Lets have the sound loop three times then stop:
<EMBED SRC="sample.mid" autostart="true"
hidden="true" loop="3" volume="100%">
<BGSOUND SRC="sample.mid">
Click Here For Sample Sound</A>
To loop the sound you may addloop="-1" for continuous sound. Or loop="number" for the times you would like the sound to play. Lets have the sound loop continuous:
<BGSOUND SRC="sample.mid" loop="-1">
Note: MSNTV users can hear either sound code. It is best to use the Netscape sound code because the lastest versions of Internet Explorer now support this tag.
Lets Add This Background Sound To Our Existing HTML Document. I'm using the Netscape sound code.
<HTML>
<HEAD>
<TITLE>Welcome To Aruba</TITLE>
</HEAD>
<BODY BACKGROUND="stars.gif" BGCOLOR="#000000"
TEXT="#00FF00" LINK="yellow" VLINK="orange" ALINK="red">
<EMBED SRC="sample.mid" AUTOSTART="true"
HIDDEN="true" VOLUME="100%">
<H1 ALIGN="CENTER">
<i><u>Welcome To Aruba</u></i></H1>
<P>
<HR SIZE=4 WIDTH="80%" ALIGN=CENTER>
<HR SIZE=4 WIDTH="60%" ALIGN=CENTER>
<HR SIZE=4 WIDTH="40%" ALIGN=CENTER>
<P>
<IMG SRC="aruba.jpg" BORDER=5 HEIGHT="150"
WIDTH="200" ALIGN="right" ALT="sunset">
<FONT SIZE="2" COLOR="white">
<b><tt>This Beautiful Sunset In Aruba.<BR>
Aruba is a lovely island off the<BR>
coast of South America.<BR>
The weather is perfect<BR>
in Aruba any day of the year.</tt></b>
</FONT>
</BODY>
</HTML>
Click Here To See Our HTML Document So Far
Use Your Back Button To Return Here