The most usual sound files have extensions as: *.WAV (windows Audio File), *.MID
(Midi File) and *.MP3 (MP# File). The
list of the most usual cases of applying sound in your page is the following:
- as a background sound (plays once or
permanently while the page is opened);
- sound appears when an image or button
is clicked;
- showing sound player start the play
automatically or clicking on "Play" button.
In IE 4/5 and NN 4/5 the situations in case 1
was
similar (not the same code) and very simple. You had to use <BODY> tag
in IE as following:
<body bgsound="myFile.mid">
and in NN <EMBED> tag as following:
<EMBED SRC="myFile.mid" AUTOSTART=FALSE LOOP=FALSE WIDTH=145 HEIGHT=55 ALIGN="CENTER"></EMBED>
As for the case 2 you just could make similar
script for both of browsers using <A> tag:
<A HREF="file:///C:/MyFolder/FileName.wav">Click To Listen!</A>
So, in the 6-th version situation became
a little bit more
complicated and to enable sound you have to put sound Plug-ins in your HTML code. The
most general code looks like this:
|