How to Link a MP3 File to a Page
- 1). Open the HTML document in your Web editor.
- 2). Insert the following code into the section of your document where you want the link to appear. Change the URL to the actual URL of your MP3 file and change the link text to reflect what you want the link to be named.
<a href="/links/?u=http://www.example.com/song.mp3">SongTitle.mp3</a> - 3). Save your document and upload it to your server (if necessary). This will place a link to the MP3 on your website. Visitors can click the link to listen to the song online or download it to their computers.
- 1). Open the page you to which you want to add background music in your Web editor.
- 2). Paste the following code into your HTML document. Replace the URL with the specific URL of your MP3. Edit the height and width, if desired, to make the MP3 player appear larger or smaller. If you want the song to play automatically and repeat continuously, leave the "autostart" and "loop" attributes unchanged; if you don't want either of these things to occur, change "true" to "false" beside each attribute:
<embed src="http://www.example.com/song.mp3"
height="75"
width="150"
autostart="true"
loop="true">
</embed> - 3). Save your webpage and upload it to your server. This code allows you to use an MP3 as background music on your page with controls that your visitors can use to change the volume and pause and restart the player.