Get "www.yourname.com" for your MySpace page. Learn how >>.

With every domain name you register with ZappyHost, you get free (ad supported) hosting AND online website builder.

PLUS you get:

  • Quick Blogcast
  • Starter Web Page
  • Email Account
  • & much more! (Total value $123 for FREE!)

Get your FREE hosting today! >>

HTML Background Music Code

This page contains the HTML code for setting background music on your webpage.

The following code sets background music. The important line is hidden="true". This is what makes it background music. If you didn't put that line, the user would see audio controls on the web page. Note that this code assumes that there is a music file at the specified location.

Here's the code:

See/hear the result. (Background music will start playing as soon as the page loads).

Add Audio Controls

To show the audio controls, just remove the hidden="true". You can also add autostart="false" so that the music doesn't start playing as soon as the page loads.

The above HTML code results in this:

Enjoy this site?

  • Add this page to your Favorites
  • Link to this page from your website
  • Add this page to your favorite social bookmarks sites:
                     

Oh, and thank you for supporting Code-Generator.net!

Privacy Policy