home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeHTML & XHTML: The Definitive GuideSearch this book

5.4. Background Audio

There is one other form of inline multimedia generally available to web surfers -- audio. Most browsers treat audio multimedia as separate documents, downloaded and displayed by special helper applications, applets, or plug-ins. Internet Explorer, on the other hand, contains a built-in sound decoder and supports a special tag that lets you integrate an audio file with your document that plays in the background as a soundtrack for your page. Section 12.1, "Applets and Objects" Section 12.2, "Embedded Content"

We applaud the developers of Internet Explorer for providing a mechanism that more cleanly integrates audio into HTML and XHTML documents. And the possibilities with audio are very enticing. But at the same time, we caution authors that the special tags and attributes for audio don't work with other browsers, and whether this is the method that the majority of browsers will eventually support is not at all assured. So, beware.

5.4.1. The <bgsound> Tag

Use the <bgsound> tag to play a soundtrack in the background. This tag is for Internet Explorer documents only. All other browsers ignore the tag. It downloads and plays an audio file when the host document is first downloaded by the user and displayed. The background sound file also will replay whenever the user refreshes the browser display.



Plays a soundtrack in the document background




End tag:

None in HTML



Used in:


Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.