It’s fairly simple to add background sound, music or spoken information to your web page but first you have to consider your visitors. Most consider it rude to put “sound” on a web page that plays automatically in the background with no option for the user to turn it off. (Think of your visitors and customers).
There are more than a few methods to add audio to your web pages.
I’ll discuss and give you the details on two of the simplest ways add audio to your web pages.
1. Create your audio file (.wav, mp3, etc.)
2. Write down the name of the file: i.e. (myaudio.wav or myaudio.mp3)
3. Write down the “path” to the file: i.e. (myweb/audio/myaudio.wav)
The next part depends upon how you have created and published your website.
You can upload the files using your HTML editor (if this option is available) or you can upload the files to your web site using an FTP program, like “Filezilla”.
Method 1 – “Hyper-link” to the file:
The HTML to add a clickable link to a sound file is simple. You’ll use the <a href></a> tag to point to the audio file. You’ll want to add a tag that looks like this:
<a href=”http://www.mywebsite/myaudio.wav”> Click here to hear my introduction.</a>
(Where the “mywebsite/myaudio.wav” is the “path” to YOUR audio file, on your website)
The words “Click here to hear my introduction.” will become a link that will cause the sound file to load and play when clicked.
You can also create a clickable link with a graphic:
<a href=”http://www.mywebsite/myaudio.wav”><img src=”http://www.mywebsite/mypix.gif”></a>
<br> Click my picture for my product introduction!
Clicking on the graphic will cause the sound file to load and play.
Method 2 – Using the <EMBED> tag:
The <EMBED> tag is the most common way of adding sound to a Web page. Its advantage over the <BGSOUND> tag is that it is supported by both browsers, and more consistently across the PC and Mac platforms. The <EMBED> tag introduces many features that aren’t supported by <BGSOUND>.
The <BGSOUND> tag only supports background sounds, the <EMBED> tag also features an interactive interface (including various buttons to play, stop and handle the sound). Let’s take a look at the <EMBED> tag in action
(requires a sound-enabled browser)
The HTML code that generates a control panel is very simple:
This code:
<EMBED height=”20″ SRC=”http://www.mywebsite/myaudio.wav” VOLUME=”50″ loop=”true” controls=”console” AUTOSTART=”FALSE” width=”128″>
(Where the src=”http://www.mywebsite/myaudio.wav” is the sound file you want played.
This is what the control console will look like:
![]()
Put the <EMBED> code on your web page where you want the console to show.
You will have to insert the HTML code using the “HTML code” portion of your HTML editor.
That’s it – AUDIO on your web page! Cool!
Here is a little definition of the console controls:
The attribute, “autostart=true,” specifies whether the file should start playing automatically after it loads. If autostart is set to “false,” then the file will load into the sound player utility but the user will have to click on the “play” button of the sound player utility in order to start the playing of the sound file.
The LOOP attribute tells the browser how many times you want the sound to repeat. If you added LOOP=”10″ to the <EMBED> tag, the sound would play 10 times and then stop LOOP=”TRUE” will play the loop until the user stops it.
CAUTION!
If you find a sound you like somewhere on the web and decide you want to use it on your web page, be sure you download the file to your hard drive then upload it to your own server.
If you link directly to the server you found the file on, you are “stealing” someone else’s bandwidth. Hot linking to someone else’s server is considered bandwidth theft; it is “not cool” and is against the law.
Michael Wise
eMarketProfitStrategies.com
You must log in to post a comment.