Background Music There are two common ways to add background music to a web site. The first involves a simple link, the second is more tenacious - you actually embed the music right into the site, so it begins to play as soon as someone begins to view the page. ADDING A SIMPLE LINK You can give your viewers the option to listen to music that flows with the theme of your web site by including a clickable link to the music file. The music can be in a variety of formats, including mid (midi), wav, MP3, ram, ra, aiff, and so on), and it is solely up to the viewer whether they listen to it or not, as they browse your site. You can provide a simple text link to the file or create a coordinating image to take them there. Example Text Link: <A HREF="http://www.yourdomain.com/beautifulday.wav">Listen to Music</A> Which would look like: Listen to Music Example Graphic Link:: <A HREF="http://www.yourdomain.com/floating.wav"> <img src="http://www.visionsofadonai.com/musicbutton.jpg" border=0 ></A> This would ultimately look like this (Music by Djan Karet, Dreamscapes): EMBEDDING MUSIC Sound can be embedded so that the music plays as soon as a web page is opened. You simply need to place appropriate code on your page. For instance, to embed a wav file of a song called "Beautiful Day". you would put the following code into your html coding (this works for various sound files such as mid, wav, mp3, ra, aiff): <EMBED SRC="beautifulday.wav" HIDDEN=true AUTOSTART=true> <NOEMBED><BGSOUND SRC="beautifulday.wav"></NOEMBED> Coding a Console: The above code works well to embed background music, but it does not allow the viewer to control whether to listen to the music or not. If you wish to give them a choice, use the following code: <embed src="beautifulday.wav" width="140" height="40" autostart="true" loop="true"> </embed> If you do not want the music to loop (play repeatedly) you can change the loop="true" command to "false". You can also customize the size of the control panel that emerges by varying the width and height within the above code. Make sure you have rights to the music file before you use it!
|