HTML - <bgsound> Tag


Advertisements


Description

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

Example

<!DOCTYPE html>
<html>

   <head>
      <title>HTML bgsound Tag</title>
   </head>

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

</html>

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

html_tags_reference.htm

Advertisements