|
|
| <HTML> <HEAD> <TITLE>Enter the Page Title Here</TITLE> </HEAD> <BODY> <BGSOUND src="download/music.mid" loop=infinite> This page loads and plays a MIDI file as background music repeatedly. </BODY> </HTML> |
Note that both MIDI (i.e., .mid) or Wave (i.e., .wav) files can be used for background music. However, it is always better to use a MIDI file for background sound because it is much smaller in file size.
It is also important to note that Netscape Navigator does not support the BGSOUND tag.

Another way to embed background sound into a Web page is to use the <EMBED> tag.
The autostart attribute ensures that the sound will be played immediately once the page is loaded. Assigning true to the loop attribute instructs the browser to play the sound infinitely. The hidden attribute determines whether the player will show up on the Web page or not.
Click here to review the page that loads and plays a MIDI sound file as background music in the Web browser.
| <HTML> <HEAD> <TITLE>Enter the Page Title Here</TITLE> </HEAD> <BODY> <EMBED src="download/music.mid" autostart=true loop=true hidden=true> This page loads and plays a MIDI file as background music repeatedly. </BODY> </HTML> |
