My Background sound problem!

Hello friends,

I designed a school site and then i added a code for background sound to it. The problem now, is that the code didnt work at all! Here is the code i typed into the <head> and later i moved it to the <body> maybe it could work. But it dint work:

<bgsound src="alanta.mp3" loop="2">

I will be glad if you help me solve this.

Thanks,
Golden Waters.
 

ronaldroe

Super Moderator
Staff member
If I'm not mistaken, and I often am, it think it has to be either .wav or .midi, but that was tag was deprecated in HTML4. Not to mention, it's a naughty thing to do.
 
Okay so, it’s a pet peeve but, why use sound? Nothing will make me close out a webpage quicker than a sound coming from it. Also if you DO decide to use sound, make SURE you put some control on it. Leaving ANY sound file to loop on your site with no chance of turning it off will only increase your bounce rate.
 

Phreaddee

Super Moderator
Staff member
indeed it is something I am loathed to do, but even I have an adamant client that WANTS to have music on their site. (despite all my protests, they still believe it is a good idea!) but as krymson mentioned the audio tag in html5 is probably the best way to do it. not only will it give you controls so you can turn it off if you desire, it will, as ronald mentioned, also not work in IE. which - really - is a good thing.

I figure if I'm to make a site with "music" playing, I should add a marquee, blinking text, animated gifs, code it in tables and frames and use comic sans, to really get that 90's feel, otherwise if you want it to work, function and feel like a "modern" website, adding music, unless you are a musician yourself, is probably the dumbest thing you can do...
 
Top