- Worldstart's Tech Tips And Computer Help - http://www.worldstart.com -

How To Add Music To Webpage?

Nina from PA. writes:

I’m making a few web pages. I’d like to add music. Have no clue how. Can you help?

Thanks, Nina

Music can really add something special to a webpage when it’s done right and fits the mood of the site. Music can be added fairly easy with HTML using the following code: (Tested on Firefox 14, IE 9 and Chrome 21)

<embed name=”MusicNameHere” src=”address/path to the music.extension” loop=”false” hidden=”true” autostart=”true”>

Replace MusicNameHere with name of the file, replace “address/path to the music.extension” with the path and file extension. Loop=True/False will select if the background audio loops. Remove hidden=True and add a width=”xx” and height=”xx” to enable audio controls on the page (replace xx with pixel size, usually 150 width by 60 height for audio.)

<embed name=”TimSample” src=”http://imgsrv.worldstart.com/tim/htmlbgaudio/TimSample.mp3″ loop=”false” hidden=”true” autostart=”true”>

To see an example page with this code running click here [1].