Embedding Audio File.
Method 1
1. Open your Web page in an HTML editor or Notepad
2. Start with an object element:
<object>
3. You'll add 4 parameters to the object. The first is "src" that tells the browser where to find
the sound file. In this example, the sound file is eureka.wav and is found in the same
directory as the Web page:
<param name="src" value="eureka.wav" />
4. If you want the sound file to play immediately after it's loaded, make the autostart parameter
"true" otherwise make it "false":
<param name="autostart" value="true" />
5. The parameter autoplay is similar to autostart, just used by other browsers, set it the same as the autostart parameter:
<param name="autoplay" value="true"/>
6. Use the controller parameter to tell the browser if a controller should be displayed to give
your readers more control over the sound:
<param name="controller" value="true" />
7. Inside the <object></object> element, add an embed element:
<embed />
8. Add the following four attributes that are the same as the parameters to the object:
<embed src="eureka.wav" controller="true" autoplay="true" autostart="True" />
9. Add the correct MIME type for your sound file into the type attribute:
<embed src="eureka.wav" controller="true" autoplay="true" autostart="True"
type="audio/wav" />
10.Add the plugins page attribute so that people who don't have the correct plugin for your sound file can go download it. For WAV files, recommended QuickTime:
<embed src="eureka.wav" controller="true" autoplay="true" autostart="True"
11.When you're done, your HTML should look like this:
<object>
<param name="autostart" value="true">
<param name="src" value="eureka.wav">
<param name="autoplay" value="true">
<param name="controller" value="true">
<embed src="eureka.wav" controller="true" autoplay="true" autostart="True"
type="audio/wav" />
</object>
Method 2
Make a hyperlink directly to the audio file using the following code (change "audiofilename.wmv" to your own file name):
<a href="audiofilename.wmv">Click here to listen audio </a>
A link is created like this: Click here to listen audio. When the end user clicks this hyperlink, their Windows Media Player will open and load the audio file for playing.
Embedding Video File.
1. First Upload Your Video to Your Web Server
2. Create your video as a .mov or .mp4 file - and then upload it to your Web server
3. Write down the full URL to your video file - you'll need it when you write your HTML.
4. Use the Object Tag to Embed Your Video Validly
The object tag is not widely supported, but it is the only way to add a QuickTime video into your pages using valid HTML.
There are two attributes that you need to include to get the video to play correctly:
Class id="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
5. You'll also want to set the width and height of the object - set the width to the width of the movie and the height to the height plus 15-20 pixels extra to include the controls.
6. Your object tag will look like:
7. Parameters Make the Object Work
8. The only parameter that you need is the src parameter - this tells the browser where to find the movie to play. Set the src attribute to the URL of your movie:
<param name="src" value="
http://URL to movie.mov" />
9. Some other parameters that can be useful to control your video and make it more userfriendly are:
- controller - this can be true or false. Remember that most people get very frustrated if they cannot control multimedia elements on Web pages that they visit. So I strongly recommend setting this to true.
- autoplay - this can be true or false. Autoplay also annoys customers. They want to decide when and whether to watch the video. So I strongl recommend setting this to false.
10.Inside the <object> tag, place the following parameters:
<param name="controller" value="true" /> <param name="autoplay" value="false" />
11.Finally, Include an Embed Tag with the Same Information If it is very important to you that all your pages validate, then you should not include this section. But remember that only people with some browsers like Safari and Opera will be able to view your video.
The embed tag should look like this. Note that all the fields are the same as the :
<embed src="
http://URL to movie.mov" width="960" height="555" autoplay="true"
12.And then close the object tag:
</object>