Placing Audio in a Web Page - The Code Tips
Including audio in your web page is simple. You just link to it as you would an image. An HTML example would be something like:
<A HREF=”anysong.wav”>
Otherwise your web page editing application like Macromedia Dreamweaver or Adobe GoLive provide easy linking methods. When the user clicks on one of these links you have created their web browser will usually open the file automatically and play it. Windows Explorer supports .wav, .aiff, .au, and .mid files.
If you are into HTML you can use the EMBED tag for much more control over playback. With EMBED you can control the appearance of the onscreen player or even hide it. If you like you can have the audio file play automatically when the page loads with:
For a hidden player: <EMBED SRC=”anysong.WAV” HIDDEN=”TRUE” AUTOSTART=”TRUE”>
For a player that is 45X200: <EMBED SRC=”anysong.WAV” HEIGHT=”45” WIDTH=”200”>
(((((Note: We're Making sound file of the word “Howdy” to use as an example for different file formats - will upload soon))))))
You can do other things with the EMBED tag too like LOOP, that allows you to specify how many times a file repeats, or STARTTIME and ENDTIME that allow you to start and end a file at a specific point od the file. The problem is that every browser doesn't support all of these attributes. My advice is to keep it simple.
When considering adding sound to a web page you should ask yourself whether or not it is really needed. People don't always like music playing in the background when they are reading. Most web pages are still similar to magazines in their presentation of text and images. If you do want a backing track to your web page it might be a good idea to include a button to turn off the sound. You don't want to annoy people with music they don't like.
Until bandwidth gets to a point where a web page can play as smoothly and as dynamically as a television show we are going to encounter limitations. If you work within those limitations you can have a very exciting soundscape to go along with your exciting visuals.












