|Adding music (or sound) to your homepage is simpler than
adding animation yet there are some complications. I have found that the
success of adding music (or sound) to your page depends to some extent
on the Internet server on which the page is placed and which browser you
use to access the page. Netscape Navigator and Microsoft Internet Explorer
are the two major browsers that are widely used today. I will limit my
discussion not only to these two browsers but also to versions 3.0x . These
versions support and allow for background music and sound to be loaded
and played by themselves after the page and graphics have been loaded.
To add music so Netscape Navigator can recognize and play it we must use the <EMBED>tag, which was originated by Netscape and allows different data (sound) types to be placed or "embedded" into an HTML document. To place a MIDI file named "OurMusic.mid" into an HTML document that will be recognized by Netscape Navigator we use the <EMBED> tag as follows:
SRC="programs/MyMusic.mid" HIDDEN=TRUE AUTOSTART=TRUE>
<BGSOUND SRC="OurMusic.mid" LOOP=INFINITE>
While the examples above have used a MIDI file, which is a universal music encoding scheme (Musical Instrument Digital Interface), Netscape Navigator and Internet Explorer Versions 3.0x also recognize and can handle other sound format files e.g. WAV (Waveform Audio) files which are the native format for PC's and the AU (Audio) files which are the native format for most UNIX workstations.
As mentioned at the beginning of this article, one of the problems I have encountered in adding music to a homepage concerns the internet servers on which the homepage resides. I have access to three servers and have recently tested the same pages with the same HTML code on each of the servers. The result was that the pages with the same code did not respond the same with each of the two browsers on all of the servers.
An example that will provide background music without a problem using either Netscape Navigator or Microsoft Internet Explorer is http://lonestar.texas.net/~weersrg/arts.htm