Audio files can be embedded into an HTML document or they can set as a link so that they will play in their own separate window. The HTML code is pretty simple. Below is the code I used to embed a MIDI file into the HTML document at my Foothill College Web Page. The MIDI file named PathMamb.mid resides in a folder called "MIDI" which resides in the current directory.
<EMBED SRC="MIDI/PathMamb.mid" WIDTH=150 HEIGHT=40 PANEL=0 AUTOSTART=TRUE REPEAT=FALSE>
The EMBED tag allow you to attach non HTML objects to a web page. This code will start the MIDI file named "PathMamb.mid" when the page is loaded into the browser. The attributes set the size, color and playback characteristics. These attributes tell the file to automatically start when the page loads and play the file once only.
You can also make a link to a audio or MIDI file. The following code can be used to link to a MIDI file. When you click on the link you will displace the current document in the window.
<A HREF="../Music10/FGA/MIDI/Rhy333322.mid" WIDTH=150 HEIGHT=40 PANEL=0
AUTOSTART=TRUE REPEAT=TRUE>MIDI file</A>
The MIDI file below will be played in the current window or frame, displacing this page.
MIDI file
If you want the file to play in a new window you can use the target attribute like this:
<A HREF="../Music10/FGA/MIDI/Rhy333322.mid" TARGET="MIDI" WIDTH=150 HEIGHT=40 PANEL=0
AUTOSTART=TRUE REPEAT=TRUE>MIDI file</A>
The MIDI file below will be played in a new window and leave the original window untouched.
MIDI file