Copyright © tutorialspoint.com

HTML <bgsound> tag



Advertisements

Function:

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

Difference between HTML and XHTML:

In HTML the <bgsound> tag has no end tag.

In XHTML the <bgsound> tag must be properly closed.

Example:

<bgsound src="audio/welcome.wav" />

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

Attributes:

AttributeValueDescription
loopnumberLets you replay a background soundtrack a certain number of times
srcURLSpeecifies the path of the sound file.

Copyright © tutorialspoint.com