HTML - <bgsound> Tag



The HTML <bgsound> tag is used to play a soundtrack in the background. This tag is for Internet Explorer only.


<!DOCTYPE html>

      <title>HTML bgsound Tag</title>

      <bgsound src = "/html/yourfile.mdi"/>
      <p>This does create any result on the screen but it plays sound file
         in the background.</p>


This will produce the following result −

Specific Attributes

The HTML <bgsound> tag also supports the following additional attributes −

Attribute Value Description
loop number Lets you replay a background soundtrack a certain number of times.
src URL Specifies the path of the sound file.

Browser Support

Chrome Firefox IE Opera Safari Android
No No Yes No No No