HTML <bgsound> tag

Updated: 11/13/2018 by Computer Hope
HTML bgsound tag

When writing in HTML, the <bgsound> tag is used to embed sound files in to a web page. Because the sound file plays automatically when the page loads, and this tag is only supported in Internet Explorer, we recommend using <audio> instead. The following sections contain information about the <bgsound> tag, including an example of its code, and related attributes and browser compatibility.

Example code

<bgsound src="https://www.computerhope.com/jargon/m/example.mp3">

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for the <bgsound> tag, and a description of each.

Attribute Description
balance Designates how the audio is split between speakers.
loop Designates that the audio file should continuously repeat.
src Designates the URL (uniform resource locator) of the audio file.
volume Designates the default volume for the audio file.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
All versions Not supported Not supported Not supported Not supported

Autoplay, Browser, Compatibility, Loop, Mute, Web design terms, Web page