Music Codes
How to embed music in html
There are several ways to embed music, midi's, mp3 and wav files on a webpage. First you need to know the name of the music file that you wish to use. Make sure you upload that file to your server.
Your visitor will need something to play the music on such as a music player like Real Player or Windows Media Player. Otherwise, they will not hear the music. However, that is not a problem nowadays as virtually every PC and desktop has one.
Simple Code
The first html music code gives your visitor the choice if they want to hear the music or not.
<a href="yourmidname.mid">Click here to play music </a>
The first html music code gives your visitor the choice if they want to hear the music or not.
<a href="yourmidname.mid">Click here to play music </a>
To embed music on your website with a shut off button
You can embed music into your page so it starts automatically when someone views your page and have a small image where your visitor can turn it off.
Place the html music code where you want the button to appear on your page
<embed src="yourmusic.mid" width=25 height=25 auto repeat=true loop=true></embed>
You can embed music into your page so it starts automatically when someone views your page and have a small image where your visitor can turn it off.
Place the html music code where you want the button to appear on your page
<embed src="yourmusic.mid" width=25 height=25 auto repeat=true loop=true></embed>
HTML music player with a console
Instead of the button, you can have a small console with on and off switches on your page
To make the music play automatically the parameter is Auto
You can put "FALSE" instead of "TRUE" so the person visiting your page can chose themselves whether to play it or not.
<embed src="yourmusic.mid" width="140" height="40" auto loop="TRUE"></embed>
Instead of the button, you can have a small console with on and off switches on your page
To make the music play automatically the parameter is Auto
You can put "FALSE" instead of "TRUE" so the person visiting your page can chose themselves whether to play it or not.
<embed src="yourmusic.mid" width="140" height="40" auto loop="TRUE"></embed>