Home | All Questions | alt.html FAQ >

How do I embed a .midi or .wav file into my page?

You can use <bgsound src="sound.wav"> in the header but this works with IE only.

Placing <embed src="sound.wav" autostart="true" width="225" height="60"> in the body is rather more cross-browser, but not at all universal. This does give controls for repeating the sound if required, but is untidy as it forces the various sound players to that size. You can resize it down to 1 x 1 to hide the controls.

Recommended Resources

Discussion

Related Questions