1. Home
  2. Computing & Technology
  3. Personal Web Pages

So You Want To Add Sound?
Putting Audio On Your Page

From , former About.com Guide

Prepare Your Files

Now that you have a message I'm sure you want to get going adding it to your Web page. There are a couple things we must do first before we can add it.

Many people find it extremely annoying to open a Web page and be inundated with music or an unwelcome message from the designer of the site. They would much rather have the option to listen or not to listen. They will often be pleased to click on a button to listen to a welcome message from you that they would otherwise have hated if it had been forced on them. That's why we are going to add such a button to your page.

Now you need a picture for them to click on. At About's Web Clip Art site there are links to sites where you can find some graphics just for this purpose. It's your choice what kind of picture you want to use. After all it is your page. If you need help downloading the graphics and getting them online see "Clip, Snip, Upload, Add".

The next thing you will need to do is to create a file called a pointer file. This file will have the extension .ram and will "point" to the audio file you are going to place on your page. To create this pointer file you need to go into your text editor and open a blank file. Save this file with the same name you called your audio file except that you are giving it an .ram extension instead of an .rm extensions like your audio file has. Inside this file you will only put one thing, the address where your audio file will be after you upload it to your site. Now take out the http:// and replace it with pnm:// . For example, if your audio file's address is http://www.geocities.com/myplace/audiofile.rm then you will use pnm://www.geocities.com/myplace/audiofile.rm . This will be the only thing in this .ram file. Do not use HTML!

Now you need to upload these files to your site. The files you are uploading are your picture, the audio file (.rm), and the pointer file (.ram). Once you have these three files uploaded you are ready to add the audio to your page.

Add HTML

This is the easy part. All the hard work is behind you and you are now ready to finally add the audio file to your Web page. Soon your visitors will be able to hear your voice and your message to them or the music you have recorded.

Find the place on your page where you want to add your sound file (it should be within the <body> </body> tags). To make sure people see it I recommend putting it at the top of the page somewhere unless the file is specific to something you are doing further down the page. Now you will create a link to the .ram file that you created. You will not create a link to the file itself, that's what the .ram file is for. If you did that the music would play uninvited. You can do this if you really want to, it's your page, but you do risk alienating your viewers.

Using the site address example we used before this would be what you would add to your code:

<A HREF="http://www.geocities.com/myplace/audiofile.ram">
<IMG SRC="http://www.geocities.com/myplace/picture.gif" BORDER=0 ALIGN=CENTER>

Here's My Message To You

That's it! Now you can test your own file. Just go to the page you added it to and click on your new button.

Good job, you did great! That wasn't so hard now, was it?

Explore Personal Web Pages
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Personal Web Pages

©2009 About.com, a part of The New York Times Company.

All rights reserved.