GarageBand For Dummies
Book image
Explore Book Buy On Amazon

There are plusses and minuses of adding sound to your Web page, but if you decide adding sound is of value to your Web page visitors, HTML offers two competing ways to add it: with the tag and with the embed tag.

The tag works well and has useful options for controlling sound, but it’s not supported by all browsers.

This example uses the tag, which is not officially supported by the HTML standard at all, but it works in most browsers. has options for different media players, such as Windows Media Player or Apple QuickTime.

Follow these steps to add sound to a Web page in a text editor:

  1. Open your Web page in Notepad.

    Let your Web page’s user know they can stop sound from playing in your Web page by clicking the Stop button in their browsers.

  2. Enter the tag and a link to the sound file you want to use.

    An example looks like this: “pathname/filename”>, “pathname/filename” is a link to the sound file.

    The simplest way to be sure you have the link right is to place the sound file in the same folder as the Web page; that way the link is simply the filename.

  3. Click File→Save and reopen the file.

    The sound should play. Test the link right away to be sure it will work.

  4. If the sound doesn’t play, experiment to make sure you have the path right and that sound plays on your machine.

    To make sure you have the link right, put the file in the same folder as your Web page and simplify the link. To make sure that sound playback works on your machine, navigate to the file in Windows Explorer and click it. It should play. If not, identify and fix the files affecting sound playback on your machine.

About This Article

This article is from the book:

About the book author:

Bob "Dr. Mac" LeVitus has been writing the "Dr. Mac" column for the Houston Chronicle for more than 20 years. A regular contributor to a variety of technology publications, he's a proud Mac aficionado who's written or co-written more than 85 how-to books on all things Mac, including multiple Mac operating systems, the iPhone, the iPad, Office for the Mac, and GarageBand.

This article can be found in the category: