HTML <bgsound> tag

You are Here:

HTML <bgsound> tag

The <bgsound> tag specifies a sound file to play in the background while the page is used.

Warning: The <bgsound> tag is deprecated and is no longer recommended.

Note: Use <audio> tag instead of <bgsound> tag.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <bgsound src="bgsound1.mid" /> <bgsound src="bgsound1.mid" loop="infinite" /> </body> </html>

Attributes

AttributeValueExplanation
balance-10,000 to 10,000Specifies, how to divide a volume between the speakers.
loop
  • numeric value
  • infinite
Specifies that the number of times a sound is to be played.
src
  • .wav
  • .au
  • .mid
Specifies the URL of the sound file to be played.
volume-10,000 to 0Specifies the loudness of the background sound of a page.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author