Joined: 31 Jul 2007 Posts: 144 Tokens: 147 Location: US
Posted: Sun Dec 30, 2007 1:41 pm Post subject: Background Music
Time to time if you want to make your website more attractive then you can think about adding some nice background music to it. However please don' forget that html background music needs more bandwidth. The usually used mp3 files are small compared to wav files, but even so much bigger then a normal html page. The W3C not approved
Code:
<body>
<p>HTML background music test</p>
<embed src="bgsound.mp3" autostart="true">
</body>
This code simply plays the given mp3 file as the page is loaded. However if the file ends the music will stop, so you maybe want to set to play music in a loop. Of course you can do this by the loop parameter and as result your code will look like this:
It's nice that with this solution the visitor can control the background music, but it destroys your page design. So you maybe want to hide the control panel of the browser plugin. In case of tag you can also use the hidden parameter as follows:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum