Embedding a sound file

Embedding audio incorporates the sound directly into the page, but the sound only plays if visitors to your site have the appropriate plug-in for the chosen sound file. Embed files if you want to use the sound as background music, or if you want to control the volume, the way the player looks on the page, or the beginning and ending points of the sound file.

TIP : When incorporating sound files in your web pages, carefully consider their appropriate use in your web site, and how visitors to your site use these media resources. Always provide a control to either enable or disable the playing of the sound, in the event that visitors don't want to listen to the audio content.

To embed an audio file:

  1. In Design view, place the insertion point where you want to embed the file and do one of the following:
    • In the Common category of the Insert bar, click the Media button and select the plug-in icon.
    • Select Insert > Media > Plugin.
  2. Choose the location of the sound file. (It should be in a relative location to your site folder.)
  3. Click OK
  4. Select the Plugin in the design view and increase the height to 32 and the width to at least 200 in the Property inspector. These values determine the size at which the audio controls are displayed in the browser.
  5. The code should look like this:
    <embed src="crap/07-06-28-net.mp3" width="200" height="32"></embed>