Open In App

HTML | <bgsound> tag

The HTML <bgsound> tag is used to play the soundtrack in the background, when you leave the page behind and open a new tab this tag will continuously play the track in the background.
This tag is not for other browsers except the Internet Explorer. It does not display any graphical interface just played the track in the background.

Syntax:



<bgsound src="">

Attribute:

Below example illustrate the HTML <bgsound> tag:
Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>
      HTML <bgsound> Tag
  </title>
    <style>
        h1 {
            color: green;
        }
    </style>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <h2>HTML <bgsound> tag</h2>
        <bgsound src=
         <p>please plugin speaker/headphone to listen to the sound.</p>
    </center>
</body>
  
</html>

Output:



Supported Browsers: The supported browsers by HTML | <bgsound> tag are listed below:

Article Tags :