The simplest method of adding sound/music to your pages is via a text or an image link. The link points to the audio file. When you click on this link, the audio file is downloaded from the server. The browser detects the file type and either launches another program or use a plug-in to play the file.
If an external program is used, a small window opens with the audio file. In case of a plug-in, the file is loaded in the same window (you can change this with the TARGET attribute of <A> tag).
Here I'll use a graphical button as a link to a song from Pink Floyd's The Final Cut. The song is in MIDI file format. If you are working under Windows, Media Player or ActiveMovie Control should be launched (depending how your system has been configured) to play this file.
Note: Internet Explorer may present a pop-up window before launching the external program. It asks you whether you would like to "open" the file or "save" it. Select "Open this file from its current location" and click on OK.
<A HREF="finalcut.mid"><IMG SRC="keys.gif" BORDER="0"></A>
There are two common ways to do this.
For Internet Explorer:
Use <BGSOUND> tag as
<BGSOUND SRC="some_file.mid" LOOP="INFINITE">
The LOOP attribute can take a number as value, which determines the number of times the file shall play or INFINITE, which makes the sound file play endlessly.
For Internet Explorer and Netscape Communicator:
For a browser compatible background sound, use <EMBED> (see below for more details on this tag).
<EMBED SRC="desprado.mid" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED>
If you want to make use of a plug-in, you would have to put the audio file inside an <EMBED> tag.
<EMBED SRC="desprado.mid" CONTROLS="CONSOLE" HEIGHT="60" WIDTH="145" AUTOSTART="FALSE"><EMBED>
The <EMBED> tag takes many attributes. Some important ones are.
Page contents: Html training course, sound and music HTml training course tutorial online free, free online music and sound html tutorial guide
Comments, questions, feedback... whatever!