Coding: XHTML: Audio
Audio is a great way to enhance your website. There are many ways to integrate audio clips into web pages. Audio can be very useful for emergent readers, people who speak or are learning foreign languages, or those learning new vocabulary. You can record sounds and save them as separate files to upload.
You'll want to provide specific information or guidelines to help people use your sound. You may also want to indicate the type and length of the audio to help end users decide whether to use your resource. It's also a good idea to provide a link to the website where the end user can download the software or plugin.
Keep in mind that audio is not accessible to the hearing impaired, so it's important to provide alternative content.
Audio Formats
You can use various file formats on your website. However consider that not all end-users have the plugs-in necessary to hear audio on their browser. Although downloading audio files is the easiest option. It's also possible to stream audio files. Go to wikipedia to learn more about audio file formats.
WAV is a Micosoft/IBM file format is generally uncompressed for maximum audio quality so the files can be large. Learn more at wikipedia.
AU is another common audio file format. Learn more at wikipedia.
MIDI standards for Musical Instrument Digital Interface and is an electronic communications protocol. These files simply transmit digital data genreated by the computer. They're often used for simple, electronic music files. Learn more at wikipedia.
MP3 is a lossy compressed audio file that can vary in quality. It produces small files great for sharing on the Internet. It is popular for digital audio. Learn more at wikipedia.
Audio Tags
You can use a text or graphic link to share your audio. You can also embed it on the page.
Separate Page
If you use the link option, it will display the audio on a separate page. This option makes your audio available to the largest audience.
Example
<p>Click the sound icon <a href="lumberjack.wav"><img src="sound.jpg" alt="plays a line from the television show Monty Python's Flying Circus" width="20" height="20" border="0" /></a>. Can you name the television show? </p>
Result
Click the sound icon
. Can you name the television show?
Embedded on Page
Embedding audio files is another option, however keep in mind that not all browsers can handle this option. Embedding incorporates the audio directly into the page. However, it only plays if visitors have the appropriate plug-in. It's important to include the controller, so that people can enable or disable the audio as they wish.
You can also set the sound to audio play automatically using autoplay="true"
Example
<embed src="lumberjack.wav"> </embed>
Result
You can also put audio in a page background. Be careful when using audio because it can be VERY annoying when played in the background! You can add the loop attribute such as loop="3" to indicate how many times you wish to loop the sound.
Example
<bgsound src="lumberjack.wav" loop="3" / >
Try It
There are many sources for online sounds. Use the Remote Audio Collections page from Multimedia Seeds for lots of example sounds. Try adding a sound to your practice page.
Learn More
Here are some sources of free music.
Links to Free Sound Effects and Music
Free Weather Sound Effects from Partners in Rhyme