Resources Menu


Adding Music or Sound to Your Website

by Andrea Butterworth


« Prev · 1 · 2 · 3 · Next »

You can embed the sound on your site to auto play when the page loads.

The HTML tag that plays music from a website is the >EMBED< tag. Inside the embed tag, you need to define several things (attributes).

  1. the source or location of the file
    SRC="the location of the audio file"
  2. whether you want the sound to start automatically when the page loads AUTOSTART="true or false"

  3. whether you want the sound to play continuously (repeat or loop) LOOP="true or false"

  4. whether the panel is visible or not on your site (this is where I recommended to leave it visible so people can turn it off) HIDDEN="true or false"

  5. if the panel is visible (not hidden), the size of it. WIDTH="145" HEIGHT="30"

    Here is a sample bit of code that has all of the attributes included:

    <EMBED SRC="mysong.mid" AUTOSTART="true" LOOP="true" HIDDEN="false" WIDTH="145" HEIGHT="30"></embed>

So now you can add music or sound to your site. Now all you have to do is decide what you want it to be. Check out the Bravenet Audio Archive for thousands of great sounds clips to choose from.

« Prev · 1 · 2 · 3 · Next »