The <bgsound> element was an Internet Explorer–only tag that played a background sound when the page loaded. It used src for the file and loop to repeat it.
Study it for legacy pages only. For real audio today, use <audio> with user controls.
Obsolete & non-standard.
Never part of standardized HTML for authors. Modern browsers ignore it. Do not use in new projects.
Use instead.
Prefer <audio> (optionally with <source>). Avoid surprise autoplay; give users pause and mute controls.
Syntax
HTML Syntax
syntax.html
<bgsound src="sound.mid" loop="infinite">
Historically written as an empty / void-like tag (sometimes self-closing). It never validated as standard HTML. Today it does nothing in current browsers.
Reference
Attributes
Historical IE attributes on <bgsound> (all obsolete with the element):
Add controls so users can play, pause, and change volume.
loop repeats like the old infinite loop when desired.
muted helps autoplay policies and avoids surprising people with loud sound.
Edge Cases & Pitfalls
Most issues today are expectations that background tags still play sound.
obsolete
Never ship bgsound
It fails silently in modern browsers. Replace it when you find it in old code.
a11y
No silent autoplay
Unexpected audio fails accessibility expectations. Always provide visible controls.
policy
Autoplay is restricted
Even with <audio autoplay>, many browsers block unmuted playback until a user gesture.
formats
MIDI / AU are not enough
IE’s .mid/.au focus does not map to modern web audio. Prefer widely supported formats with <audio>/<source>.
DOM
Parsed as unknown
In current engines, bgsound is an HTMLUnknownElement (Firefox once wrongly used a span interface).
Compatibility
Browser Support
The <bgsound> element is obsolete and non-standard. MDN removed its docs as irrelevant. Only legacy Internet Explorer played it.
✓ Obsolete · Non-standard
<bgsound>
No support in modern Chrome, Firefox, Safari, Edge, or Opera. Internet Explorer was the historical engine. Use audio instead.
0%Modern support
Google ChromeNever supported
Not supported
Mozilla FirefoxNever supported
Not supported
Apple SafariNever supported
Not supported
Microsoft EdgeChromium · no bgsound
Not supported
OperaNever supported
Not supported
Internet ExplorerLegacy only · EOL
Legacy only
<bgsound>Not supported
Bottom line: Learn <bgsound> for history and audits only. Ship sound with <audio controls>.
Remember
Key Takeaways
Role: IE-only background soundtrack — never standardized.
Attrs:src, loop, balance, volume (historical).
Status: obsolete and non-standard — ignored everywhere modern.
Replace with:<audio controls> (loop/muted as needed).
One line:<bgsound> is web history — use <audio> with controls instead.
UA style
Default CSS Settings
Unknown / obsolete elements like bgsound are not meant to render as media UI. Engines typically treat them as non-replaced unknown elements:
default.css
bgsound {
display: none;
}
Do not style bgsound for production. Style your visible <audio controls> player instead.
Frequently Asked Questions
bgsound was an Internet Explorer–only element that played a background sound when the page loaded, using attributes like src and loop.
No. It is obsolete and non-standard. It was never in the HTML Living Standard for authors. Modern browsers ignore it.
Use the HTML audio element with controls so users can play, pause, and mute. Prefer muted autoplay only when you truly need background sound and browsers allow it.
Historically .wav, .au, and .mid. Modern audio uses formats such as MP3, Ogg, and WAV via the audio element and source children.
No. Native support was effectively Internet Explorer only. Other browsers treat it as an unknown element and do not play sound.
Unexpected sound harms accessibility and annoys users. Always provide controls, and mute by default if you attempt autoplay.