W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2y
2.1y

<BGSOUND>

Description

Play a background sound when the page is opened. This element must be placed in the HEAD section of the document.

Because this element is only supported by the Internet Explorer, I prefer to use the EMBED element to add a background sound. This element is now supported by both Internet Explorer and Netscape Navigator.

Attributes

W3 3.2n NS 3.0n
4.0n
IE 3.0y TV 1.2y
2.1y
LOOP
Set the number of times the sound is played. If you specify the value -1 or INFINITE for this attribute, then the sound will be played continuously while the page is active.
W3 3.2n NS 3.0n
4.0n
IE 3.0y TV 1.2y
2.1y
SRC
The address of the sound. The file can be a .wav, .au or .mid file.

Examples

Source
To experience a page with a background sound
<A href="BGSOUND1.html">view this example</A>.
 
Result
To experience a page with a background sound view this example.
Statistics