Lesson 21 – Background Music
Posted by cssbytes on August 12, 2007
Now, I personally wouldn’t like having background music on my website, or any website that I may visit, because the chances are, I won’t like the music that is being played. Nevertheless, I’m sure some people would want this, so I’ll post this. Anyway, like the post before, Background is only available for IE users (I believe), but I’m not very clear on the subject, so I may be wrong. My coding hopefully won’t be wrong, but I suggest you do a Google search for some extra help, after reading this post. Here’s the code for it (note – it may be wrong):
| <bgsound src=”yourmusicfile.mp3″ loop=’infinite’> |
- There is no CSS code for background music, so you will just have to make do with a HTML one. Still, at least it’s a short one!
- I believe it can be almost any format, but you will need to host the file on an internet site. I can’t really help you with this, but I’m sure that another Google search can.
- And finally, the “loop=’infinite’” part, means that your background music will just be constantly repeated until the person leaves the page. Just remove it, and your music will only play once. Simple.
That is it for now. I hope this post has helped you, as I have told you all that I know about this subject (which isn’t really much). And, to add to that, this is the end of the body section. I shall be moving on to other things now, which I haven’t decided yet. Bye-bye!