How to Embed Media Player on a Webpage
One way to enhance your Web page and make it more memorable and enjoyable for users to visit is to put a media player on it so that they can listen to music while browsing. You can add music to your Web page without putting a media player on it, but a media player allows the user to control the music on the Web page so that if the user doesn't want to hear it, he can stop or pause it rather than leaving your Web page completely. The process to embed a media player on a Web page requires the correct HTML code.
Instructions
-
-
1
Sign up for a free file host account if you don't already have one (See Resources for examples of file hosts). Click the file host's "Upload" button and select the audio file from your computer's hard drive that you want to upload to your account.
-
2
Navigate to your Web host and sign in to your account. Open the Web page on which you want to embed the media player.
-
-
3
Copy and paste the following code into the Web page where you want the media player to appear, filling in the "Title of media" and "URL to media" sections:
<embed name="Title of media"
src="URL to media"
loop="false"
width="300"
height="90"
hidden="false"
autostart="false">
</embed>
The URL to your media is the URL where your audio file is hosted on your file host account.
-
4
Click the "Save" button to save your Web page with the media player embedded in it.
-
1
Tips & Warnings
Adjust the height and width of the media player by changing the values in the embed code (the values are in pixels).
If you want the media to start playing automatically when the page is accessed, change the "autostart" value to "true."
Beware of making a mistake with the HTML code because it might not work properly if you do.