Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 391177 of <bgsound>

  • Revision slug: Web/HTML/Element/bgsound
  • Revision title: <bgsound>
  • Revision id: 391177
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment HTML/Element/bgsound Web/HTML/Element/bgsound

Revision Content

{{non-standard_header}}

Summary

The HTML Background Sound Element (<bgsound>) is an Internet Explorer element associating a background sound with a page.

Attributes

{{htmlattrdef("balance")}}
This attribute defines a number between -10,000 and +10,000 that determines how the volume will be divided between the speakers.
{{htmlattrdef("loop")}}
This attribute indicates the number of times a sound is to be played and either has a numeric value or the keyword infinite.
{{htmlattrdef("src")}}
This attribute specifies the URL of the sound file to be played, which must be one of the following types: .wav, .au, or .mid.
{{htmlattrdef("volume")}}
This attribute defines a number between -10,000 and 0 that determines the loudness of a page's background sound.

Example

<bgsound src="sound1.mid">

<bgsound src="sound2.au" loop="infinite"> 

Notes

Similar functionality can be achieved in some versions of Netscape using the <embed> tag to invoke an audio player.

You can write bgsound with a self-closing tag <bgsound />. However, since this element is not part of a standard, making it XHTML-like will not make it validate.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatUnknown}} {{CompatNo}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • {{htmlelement("audio")}}
{{HTML:Element_Navigation}}

Revision Source

<div>
  {{non-standard_header}}</div>
<h2 id="Summary">Summary</h2>
<p>The HTML Background Sound Element (&lt;bgsound&gt;) is an Internet Explorer element associating a background sound with a page.</p>
<h2 id="Attributes">Attributes</h2>
<dl>
  <dt>
    {{htmlattrdef("balance")}}</dt>
  <dd>
    This attribute defines a number between -10,000 and +10,000 that determines how the volume will be divided between the speakers.</dd>
  <dt>
    {{htmlattrdef("loop")}}</dt>
  <dd>
    This attribute indicates the number of times a sound is to be played and either has a numeric value or the keyword infinite.</dd>
  <dt>
    {{htmlattrdef("src")}}</dt>
  <dd>
    This attribute specifies the URL of the sound file to be played, which must be one of the following types: .wav, .au, or .mid.</dd>
  <dt>
    {{htmlattrdef("volume")}}</dt>
  <dd>
    This attribute defines a number between -10,000 and 0 that determines the loudness of a page's background sound.</dd>
</dl>
<h2 id="Example">Example</h2>
<pre class="brush:html">
&lt;bgsound src="sound1.mid"&gt;

&lt;bgsound src="sound2.au" loop="infinite"&gt; 
</pre>
<h2 id="Notes">Notes</h2>
<p>Similar functionality can be achieved in some versions of Netscape using the <code>&lt;embed&gt;</code> tag to invoke an audio player.</p>
<p>You can write bgsound with a self-closing tag <code>&lt;bgsound /&gt;</code>. However, since this element is not part of a standard, making it XHTML-like will not make it validate.</p>
<h2 id="Compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{htmlelement("audio")}}</li>
</ul>
<div>
  {{HTML:Element_Navigation}}</div>
Revert to this revision