tags:

views:

471

answers:

5

What is the use of the <bgsound> tag in HTML?

+3  A: 

tells the browser to play a particular sound when the page is loaded.

link:

http://www.htmlcodetutorial.com/sounds/sounds%5Ffamsupp%5F18.html

Haim Evgi
+21  A: 

It is a non-standard tag which instructs the browser to load and play a sound file (famously, at least in the mid-90's, a MIDI file) while the user is browsing your site.

Except in a few very special cases, the real purpose is to time how fast the user can find his browser's "close" or "back" button. Seriously, don't use it, on almost every site sound is unwelcome.

If you do decide to use it, you'll want to consider marquee and blink as well. Also an animated-GIF construction worker "under construction" sign and purple text on a dark green background.

If you want to give the user an option of playing music on your site (e.g., because its a music site), I suggest that a flash widget is your best bet. Depending on the site, it may or may not be appropriate to auto-play the music. Alternatively, you could use the new HTML5 audio element (though support is lacking).

derobert
The last paragraph should be bold! +1
alex
+1 because I laughed.
jjclarkson
Purple on dark green? WTF?!? You mean fuchsia text on lime and yellow tiled swirly patterns, right? And don't forget to use Times New Roman and Comic Sans.
Peter Boughton
Ages and ages ago, when I was first learning DOS, I found the color combination of blue-on-chartreuse (#0000FF on #00FF00) to be quite pleasing. Why, yes, I *am* colorblind, how did you know?
Ben Blank
A: 

A "background sound" is a sound that starts to play automatically when the web page is loaded.

joe
A: 

This attribute is used to define what the source of the sound is. Insert the file name and file path if necessary here.
http://www.abiglime.com/webmaster/reference/html/tags/bgsound.htm

Nakul Chaudhary
+3  A: 

The other answers are all wrong. This tag is used to get the user to close the page instantly.

TokenMacGuy
No need to hide behind CW, I think you'll find most people agree with you. :-)
Ben Blank