Sound on Your Web Page
Now that you have your images and your links on your page, and your background image if you want one, then you might want to put a little music on your page. There are a number of different file formats for sounds and music that you can use, but one thing to remember is that some people find the music rather irritating. You can hide the music controls for the sound files after they are on your pages, but you might want to consider leaving the console on the page, so that people have the option to turn it off.
Most of the files that you will use are midi or wav files. Most of the time, midis are smaller files and they load much faster than a wav, however a wav song sometimes contains the words as well as the music. You do have to consider how large the file is and how long it is going to take to load, because by the time that someone is done with reading your page, and the wav file finally kicks in, they might already be gone. The midi or wav files are uploaded in your file manager, just like the image files or the html pages that you use. Here is a midi file called "The Inner Light". Right click, and select "save target as" and save to a file on your hard drive.
The Inner Light
Now upload it to your file manager. Then put this code in the body of your page.
<embed src="The_Inner_Light.mid" width="100" height="50" autostart="true" loop="true" hidden="false"></embed>
**NOTE
This midi is based on the flute theme from the Star Trek: The Next Generation Episode "The Inner Light" Flute theme composed for the episode by Dennis McCarthy Orchestral MIDI arrangement and sequence by Michael Ducharme. Used with permission. If you use this midi on a web page, please give credit where it is due.
You can change the height and width attributes to change the size of the music player on your page. The "autostart" attribute causes the music to start when the page is loaded. If you put "false" here, the play button has to be clicked for the music to start. I generally leave the music on, and leave the visitors the option to turn it off. The "loop" attribute if "true" is selected will play the music indefinitely. The "hidden" attribute allows you the option to hide the music player, if you say "false" instead of "true". Now upload your page, view and listen to your page with music.
In our next lesson, we will be learning about tables, and how to do a layered background.
 
©2003 From the Heart Graphics and Web Design
All Rights Reserved
|