The HTML <bgsound> tag is used to play a soundtrack in the background. This tag is for Internet Explorer only.
<!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 −
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. |
| Chrome | Firefox | IE | Opera | Safari | Android |
|---|---|---|---|---|---|
| No | No | Yes | No | No | No |
57 Lectures 5.5 hours
54 Lectures 6 hours
45 Lectures 5.5 hours