Step 1. Find a music sound file that you would like to use. Midi (.mid) is a good sound format to use because these files are generally smaller and load quickly, but you can also use .mp3 or .wav music, but keep in mind that big files will take the music longer to load. Be mindful of those who still have slow Internet access.
P.S. Make sure you have rights to the music file before you use it!
Step 2. Next, upload (save) this music file to your web server either using an FTP program or your web host’s file management control panel.
Step 3. Now open the web page you want the song to load with. You’ll have to insert the following HTML code into your site, but first you’ll need to edit it.
<embed src=”musicfile.mp3″ autostart=”true” loop=”false”>
Note: Music file should be in the same folder with web page, or you have to modify src path.