How to add the audio files to your Webpage

If you want to add the audio file then just replace the name of the video file with the other audio file name.
 
Example:
<img border=”0″ dynsrc=”img\border.wav” start=”fileopen” loop=”0″ width=”134″ height=”138″>
 
Attribute Value Description
dynsrc path_of_movie_file Defines the path of movie file.
start fileopen, mouseover Defines the instances on which movie starts playing.
loop 0 to n , infinite Defines the no. of times movie should repeat.
width, height pixels Defines the height & width of movie window.
border 0 to n Defines the width of border of movie window.
 
 
start
if you want that movie starts playing when page gets opened then use start=”fileopen”, if you want that it should open when mouse pointer moves over it then use start=”mouseover”.
 
Loop
If want to play the movie in repeating manner then use loop=”infinite” or you can provide the value 0 to n.
if loop=”0″ then movie will play only one time.
 
So lets see an example so will get more clear.
 
Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks.
 
Example:
<html>
<body>
<p>
<img border=”0″ dynsrc=”img\dog.mpeg” start=”fileopen” loop=”0″ width=”134″ height=”138″>
<br>
</html>
 
Page in browser will look like:
 

<name=”mediaplayer1″ width=”100″ height=”100″ autostart=”1″ showcontrols=”1″ volume=”-450″>

 

 
Click here to see the Animation of how to create the above web page
 
 
<embed> tag
This tag is also used to insert the Audio & Video file on the web pages.
 
Format:
<embed src=”path of sound file” align=”top” autostart=”true” controls=”consol” height=”10″ width=”10″ Hidden=”true” loop=”true”>
 
 
Attributes
 
Attribute Value Description
dynsrc path_of_movie_file Defines the path of movie file.
autostart true, false Defines the instances on which movie starts playing.
true- the file starts playing automatically on page open
false- the do not starts playing on page open.
loop true
false
positive integer
Defines the no. of times movie should repeat.
true- file will play for infinite loop.
false-file will play only once
0 to n positive integer will play file for value of n times.
width, height pixels Defines the height & width of movie window.
hidden true false Defines the controls to be hidden or not.true– control gets hidden.
controls consol, smallconsol, playbutton,pausebutton,
stopbutton, volumelever
Defines the types of controls the user wants on the page to control the file.
 
So now lets do some practical.
Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks.
 
Example:
<html>
<body>
<p>
<b>starts on file open</b><br>
<embed src=”path of sound file” align=”top” autostart=”true” controls=”consol”height=”10″ width=”10″ Hidden=”true” loop=”true”><br>
</body>
</html>
 
By using the <embed> tag use can play both type of files (audio & video), just you have to provide the path of the file in the src attribute.