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 following result:

This does create any result on the screen but it plays sound file in the background.

Specific Attributes

The HTML <bgsound> tag also supports following additional attributes:

AttributeValueDescription
loop numberLets you replay a background soundtrack a certain number of times.
src URLSpecifies the path of the sound file.

Browser Support

ChromeFirefoxIEOperaSafariAndroid
NoNoYesNoNoNo

html_tags_reference.htm

Advertisements