Choosing Whether to Use Sound on Your Web Pages
Many people want to have a soundtrack or mood music on their Web sites. Sounds can make using the site more pleasant and contribute to its personality. Ideally, the user would be able to easily turn the sound on or off; most users would probably prefer being offered this choice before any sound started.
Unfortunately, using sound is complicated. You can put a sound file in a Web page but not a Web site. So you can indeed start a sound playing on a given page of your site. But when the user leaves that page for the next one, sound stops.
Using sound on a Web page is easier on any specific type and version of a Web browser, but not easy across different types of Web browsers and different versions. The accepted HTML coding for this capability has changed over the last several years. It used to be that the embed HTML command could, well, embed any kind of multimedia file in a Web site. But it never became an official standard, so Microsoft stopped supporting it, supporting the bgsound (background sound) command instead.
Because of all this complexity, few Web sites embed sounds in Web pages. Because it’s rarely needed, some users haven’t downloaded the software needed to play back sounds from within Web pages. So if you go to the effort, and make it work, you may still be asking the user to go through a difficult and time-consuming program download just to play a background sound in your Web page.
So, believe it or not, there’s no simple, reliable, completely user-acceptable way to make a sound play in your Web page. Except by embedding the sound in a video file or by offering sound files for download.