Embedding Sound in Web Pages

The EMBED tag is the most common way of adding sound to a Web page. The <EMBED> tag features a control panel (including various buttons to click in order to play, stop, pause, and repeat the sound)

Look at the EMBED tag in action:

The HTML code that generates a control panel is very simple:
<EMBED SRC="xfiles.mid" HEIGHT="60" WIDTH="144">

Height="60" creates the height of the control panel. It can't be higher than 60 pixels.

Width="144" creates the width of the control panel. It can't be longer than 144 pixels.

If you don't want the control panel to be seen you need to add the hidden="true" tag after the width tag:

HIDDEN="true" makes the embedded object hidden or invisible

HIDDEN="false" makes the embedded object visible. The automatic setting is HIDDEN="false".

If you want the sound to start as soon as your page is accessed, you need to add the autostart tag after the hidden tag:

AUTOSTART="true"

If you want the sound to repeat a specific number of times, you need to add the playcount tag and the number of times you want the sound to repeat:

PLAYCOUNT="4" (it will repeat 4 times)

Sound files you want to save and use can be in any recognizable format (For example: .mid, .wav, .au).

To save a sound file from a web page, right click it and choose "save target as" and then save it in the "My documents" folder. Then go to your notepad document and type the exact name you saved it , right after <EMBED SRC="

Here it is all in one long tag!

<EMBED SRC="infinity.wav" HEIGHT="60" WIDTH="144" HIDDEN="false" AUTOSTART="false" PLAYCOUNT="4" >

Now, click on the start button to make the sound repeat 4 times.