An audio file

Some older tutorials and NETG use the deprecated tag BGSOUND to embed audio onto a web page. DO NOT this tag. Use <embed> </embed>. A deprecated tag does not work in all browsers.

From a design viewpoint, it's really obnoxious to have sound on a web page that the user can't turn off or control. You will not get credit for your audio if you use the BGSOUND tag.

 

The Code:

<embed src="../media/audio/searchingsample.mp3" width="250" height="32" autostart="false" loop="false"></embed>

 

If you put your audio in the same folder as your html file, then your path would be this:

<embed src="searchingsample.mp3" width="250" height="32" autostart="false" loop="false"></embed>

You need to set the height and width parameters so that the controller bar will display. It's always a good idea to give your user control over the audio and video.

   
Click here to see an example and the code for embedding a .wma or .mp3 audio file.

 

A video file

Click here to see an example, including code of what your page MIGHT look like.

Here is what a video clip looks like when it is embedded into your page:

The Code:

<embed src="../../edtc560/tutorials/salmon.asx" width="300" height="300" autostart="false" loop="false"></embed>

If you put your video file in the same folder as your html file, then your path would be this:

<embed src="salmon.asx" width="300" height="300" autostart="false" loop="false"></embed>

  • HEIGHT="xx" and WIDTH="xx" This sets the height and width of the space in which the embedded item will play.
  • AUTOSTART="xx" This tells the browser to start the video right away ("true") upon its download completion or to wait for viewer clicks to start playing ("false" or no use of the command). Funny thing...this command worked in Internet Explorer, but not in Netscape Navigator or Mozilla's FireFox.
  • LOOP="xx" This states if the video will play again and again ("true") or if it should play once and stop ("false" or no use of the LOOP command.)
 

For instructions on how to embed media using Dreamweaver, click here.

Close Window