How to Play an Audio File in XHTML
There is a good chance that most Web pages you visit are already encoded in XHTML. XHTML is a cleaner version of HTML. XHTML is nearly identical to HTML 4.01. Thanks to this, the process you follow to do most things in XHTML is exactly the same as the process you follow to do things in HTML. This includes playing audio files on a Web page.
Instructions
-
-
1
Log in to your Web server.
-
2
Open the XHTML page on which you want to play an audio file.
-
-
3
Insert the following code if you want audio to play automatically:
<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="http://www.yoursite.com/file.wav"/>
</object>
Replace "http://www.yoursite.com/file.wav" with the actual URL or file path of the audio file you want to play.
-
4
Insert the following code if you want the audio to play after a link is clicked:
<a href="http://www.yoursite.com/file.mid">Play the Audio</a>
Replace "http://www.yoursite.com/file.mid" with the URL or file path of the audio that you want to play and replace "Play the Audio" with the text you want to appear on the link.
-
5
Publish the page.
-
1