| Background Music |
| Adding background sound |
| <bgsound> allows the creation of pages with background sounds. These sounds can be either .wav or .au format or Midi (.mid) format. |
|
|
| The "bgsound" tells the browser that the file will be loaded with the background. This is nice but the person who views the page has no control over the sound.
|
|
| <bgsound src="romeo.mid" loop="infinite"> |
|
|
|
| If you would like the midi to play non-stop then either make it loop infinite or -1. |
| Note: This is the script used for Internet Explorer only. |
|
|
Embedding background sound |
| The other way to add a background sound to your page is to use the <embed> tag. Most of the browsers support this tag. |
| This example will have a pop up player that gives basic control to the guest. This basic control allows the person to play the audio in a second time or stop it. |
| <embed src="romeo.mid" height="40" width="250" autoplay=FALSE loop=TRUE> | |
|
| If you want the background music starts when the page loads, you can set the AUTOPLAY to true. |
|