bgSound

< html‎ | elements
Jump to: navigation, search

bgSound

This article is Not Ready.


Non-Standard

Summary

The bgsound element (<bgsound>) instructs the browser to load and play a sound file while the user is on that page. Don't use it. Use the audio element instead.


Overview Table

DOM Interface HTMLBGSoundElement

Examples

If you want to use sound, please use the audio element:

HTML

<audio autoplay id="bgsound">
 <source src="http://media.w3.org/2010/07/bunny/04-Death_Becomes_Fur.mp4"
         type="audio/mp4">
 <source src="http://media.w3.org/2010/07/bunny/04-Death_Becomes_Fur.oga"
         type="audio/ogg; codecs=vorbis">
 <p>Your user agent does not support the HTML5 Audio element.</p>
</audio>
<button type="button"
        onclick="document.getElementById('bgsound').pause();">
  Stop background sound
</button>

Notes

Remarks

The <bgSound> element can appear anywhere within the document. This element is not rendered. This element does not require a closing tag. Do not use it! In HTML5 the <bgSound> is described as "non-conforming feature".

Standards information

There are no standards that apply here.

HTML information

{

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related articles

Audio







  • bgSound



Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]