SEARCH OUR SITE
HOME TUTORIALS RESOURCES SEARCH ABOUT US CONTACT US HELP
 Guide to Learning HTML - Tutorial - Background Music
Background Music
Adding background sound
<bgsound> allows the creation of pages with background sounds. These sounds can be either .wav or .au format or Midi (.mid) format.
<bgsound src="URL">
The "bgsound" tells the browser that the file will be loaded with the background. This is nice but the person who views the page has no control over the sound.

<bgsound src="romeo.mid" loop="infinite">
If you would like the midi to play non-stop then either make it loop infinite or -1.
Note: This is the script used for Internet Explorer only.

Embedding background sound
The other way to add a background sound to your page is to use the <embed> tag. Most of the browsers support this tag.
This example will have a pop up player that gives basic control to the guest. This basic control allows the person to play the audio in a second time or stop it.
<embed src="romeo.mid" height="40" width="250" autoplay=FALSE loop=TRUE>
If you want the background music starts when the page loads, you can set the AUTOPLAY to true.


Choose a topic
 Basic HTML
  - Basic
  - Background
  - Links
  - Images
 Intermediate HTML
  - Font Size
  - Text
  - Lists
  - Background Music
 Advanced HTML
  - Tables
  - Frames
  - Meta Tag
 Quick Reference
  - HTML Tags
  - Special Characters
 Location: /28461/music.htm
PREVIOUS PAGE NEXT PAGE

| Home | Tutorials | Resources | Search | About Us | Contact Us | Help |


This web site is best viewed with 800 x 600 High Color,
Internet Explorer 4.0 or Netscape 4.0 or later versions.
This entire site, except for licensed resources,
Copyright © 1999 by Team28461 All rights reserved.