Pr.Pg Next Pg

<BGSOUND> tag tutorials Adding Sound to Site

This is a singular tag. It doesn’t require closing tag.

This tag element embeds background sound within document. It has following attributes

 

Sr No

Attributes

Descriptions

1

SRC

SOUND FILE NAME: This attribute of <BGSOUND> tag element helps to specify Sound file source name. You can include following sound type file like

WAV Wave Sound file

.AU Audio Sound file

.MID Midi Sound file

2

LOOP

Number of times or INFINITE: This attribute of <BGSOUND> tag element helps to specify number of times a background sound file repeats. LOOP = 3 means sound file should be played for 3 times. If you want it to played continuously, then specify LOOP = 1 or LOOP = INFINITE.

 

Note: bgsound tag is not supported in Google Chrome, Safari,Opera and Firefox.

Only Internet Explorer is supported the bgsound tag.

 

Syntax:

<body>

<bgsound src=sound link loop=number of play>

</body>

 

Example: HTML program to demonstrate bgsound element

Output:
Pr.Pg border                                              Next Pg