Name
Background Sound
Description
Plays music or a sound when the web page loads, which can loop a number of
times or continuously. The format of the sound must be supported by the
browser - you will be safe with WAV and MIDI files. It is unwise to use
large files such as full length tracks in MP3 format due to the time it would
take people with slow connections to download. The BGSOUND tag must be
used within the HEAD tag.
Attributes
LOOP
The number of times the sound will be repeated. Set to 'infinite' to
loop continuously.
SRC
Specifies the file to play. To play a file on the same site use the
local path e.g. src="sound.wav" or src="folder/music.mid".
You can also use dots to play a file in the parent folder e.g. src="..\beethoven.mid".
To play a file on another site, use the full URL e.g.: href="http://www.martin2k.co.uk/music.mid".
Related Tags
The BGSOUND tag is used within the HEAD tag.
Example
Code
<head>
<bgsound src="rock1.mid" loop="infinite">
</head>
Code
<head>
<bgsound src="lion.wav" loop="1">
</head>
© Martin Allen 1999 - 2006. Last updated Saturday 25 March 2006 11:38:14 AM -0000.
|