how to put sound on a web page

How Do I .........??

-- Put Sound on a Page --



It's easy to have music play when someone views your pages. This is also a VERY controversial subject. The best way is to have it as an option, to hear music, or not.

<HTML>
<HEAD>
<TITLE>A MIDI Example</TITLE>
</HEAD>
<BODY>
<BGSOUND SRC="boogie.mid">


With the following code added, it will work with Mozilla based browsers.

<object data="sound/boogie.mid" type="application/x-mplayer2" width="0" height="0">
<param name="filename" value="sound/boogie.mid">
<param name="autostart" value="1">
<param name="playcount" value="true">
</object>
</BODY>
</HTML>



Here is another example that uses JavaScript.