The <embed> tag is historically the oldest and still works on netscape and some other browser. Using allows you to simply embed sound files into the pages like graphics. Sadly newer verions of internet explorer browsers run into trouble with it.
Hear me speak ->
(sorry to some internet explorer users. It won't work)
<embed src="test.wav" Tells the browser to embed the following URL (here the relative URL "test.wav" - you could use an absolute URL )
autostart="false" Tells the browser not to automatically play the sound file (the autoplay value is "true"). If this is set at "false" you'll need to display the controls to allow users to turn on the sound effects- see below). Values are true or false.
width="140" height="60" Determine the size of the sound controls. Here 140 x 60 pixels
loop="false" Tell the browser not to repeat (loop) the file. Is set at true or infinite will run add nauseam or you can assign a value. Note it appears you must have some of the sound control unit present for this to work (e.g. try setting width and height at "10") with navigator
Now if you make it really small you can hide the player
Now those of using browsers like the latest version of internet explorer will be get a bit fed up as nothing is happening.
They have a handy <bgsound> tag
Again the tag does exactly what the name say
The essentials of the example below are coded by
<bgsound src="test.wav" loop=infinite>
loop serves the same function as you get with <embed>.
The final tag is the <object> tag
This is a jack of all trades tag designed to be the key tag for multimedia elements (you can even add images with it). In HTML 4 it was brought in to replace multimedia tags like <embed> and <applet>.
Essentially the object tag defines the embedded "object" located at the classid. The type tag just defines the media type (n.b. some would suggest using audio/x-wav instead). Just as with the <applet> tag the <param> tags define the parameters for that object