# bgsound

Specifies a background sound to play while loading the document.

## Platform Support

IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | ---
2.0+ | no | no | no | no

## Example

This example specifies that a sound file called "horns.wav" should play in a loop while loading the page:

    <bgsound src="sounds/horns.wav" loop="infinite" />

## Remarks

IE only.

## Attribute Detail

Attribute | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
balance (bgsound) [-10000 through +10000] Number between -10000 and +10000 that specifies the sound balance for the left and right speakers. | no | no | no | no | no
id [element-id] Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
loop [number] Number of times to loop the media file. Specify "infinite" for a continuous loop. | 2.0+ | no | no | no | 1.0+
src [url] URL for the source for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
volume (bgsound) [-10000 through 0] Number between -10000 and 0 that specifies the volume for the sound file. | no | no | no | no | no

## Event Detail

Event | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
onlayoutcomplete Fires when Print or Print Preview finishes laying out the content in a LayoutRect with the source data. | 4.0+ | no | no | no | no
onmouseenter Fires when the mouse pointer enters the element. | 4.0+ | no | no | no | no
onmouseleave Fires when the mouse pointer leaves the element. | 4.0+ | no | no | no | no
onreadystatechange Fires when the ready state of the element changes. | 4.0+ | no | no | no | no

text_html aptana_docs