Sound Planning

Jazz up your website with simple sounds


 

You've got great looking graphics and stellar content on your site. Now you can add sound.

We don't recommend holding your viewers hostage by forcing them to listen to a loop of music while viewing your site, but sound, when tastefully done, can add to the experience.

Many people let users click on a link to hear the music. The link looks like this:

<a href="http://www.leoville.com/sounds/okbyebye.wav">

You can also embed sound into your webpage. It's possible to force visitors to automatically hear a sound as the page loads, but it's better to give them the choice to activate the sound file.

To embed a sound in your webpage, use the embed tag:

<embed src="nameoffile" type="audio/wav" autostart="false" loop=false></embed>

  • Embed src="nameoffile": This is the sound file embedded.

  • Type="filetype": Add the file type. For example, audio/wav.

  • Autostart="false": Tells the browser to play the sound file when activated.

  • Loop="false": This instructs the browser to play the sound only once. You can tell the sound to keep repeating by adding "Loop=true," but unless you want to drive your users crazy, I don't recommend it.

You should always add a console to give your users control to start or pause sounds:

<embed src="nameoffile" height="150" width="15" align="bottom" autostart="true" controls="console"></embed>

  • Embed src="nameoffile": This brings the proper sound file up.

  • Height & width: This determines the size of the console in pixels.

  • Align="bottom": The align tag determines the position of the console on the page.

  • Autostart="false": Make this "true" if you're set on forcing people to listen.

  • Controls="console": This displays the console.


Home HTML Menu Extra Information HTML Hub