English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The pages are in html. Is there anyway you can have music in the background when visitor sees the web page?

2006-10-08 03:24:55 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

6 answers

Basic Information About Sound Files
The two most widely supported file formats for sound files are MIDI and WAV. As with graphic files, you'll want to keep the size of the file as small as possible while maintaining quality.
The differences between WAV and MIDI are that MIDI files are generally a great deal smaller, however, many types of audio, such as speech, don't work well as MIDI files. MIDI is a good file format for music. A one minute WAV file can be as large as 1MB in size, while a 1 minute MIDI file can be less than 25K. Using software convertors, it may be possible to resample WAV files to reduce their file size. See the bottom of this page for links to helpful software sites.

Create a Clickable Link to a Sound File
The HTML to add a clickable link to a sound file is simple. You'll use the A HREF tag to point to the audio file. If you need help creating a path to the file, review our paths tutorial. You'll want to add a tag that looks like this:
Click here to hear my cat meow.

The words "Click here to hear my cat meow" will become a link that will cause the sound file to load when clicked. You can also create a clickable link with a graphic:


Click the cat! (6K File)

The benefit of adding audio this way is that you give your web site visitors a choice of hearing the sound file. Since audio over the Internet is less than perfect, and the file sizes can be large, consider offering this choice to your web site visitors.


Create Sound Files That Play Automatically
Now things get sticky. You'll need to use two different HTML tags to play a sound automatically for both Internet Explorer and Netscape Navigator. (Big sigh). However, before we jump in, take a moment to think:
Do I really, really, really want to automatically load an audio file?
If a web site visitor has to wait for an audio file to load, you're giving them an opportunity and an excuse to leave your web site. The longer the wait, the larger the chances are that they will leave. So carefully consider your file sizes and placement of automatically playing sound files.

Here are the tags you'll need. The BGSOUND SRC tag is for Internet Explorer, the Embed tag is for Netscape Navigator:




This will create an infinitely looping sound for both IE and Netscape. To create a sound that doesn't loop:




With the later versions of Internet Explorer, however, the above tag will give IE users two sound controls. To avoid that, add the NOEMBED and closing /NOEMBED tag around the BGSOUND SRC tag:

<br /> <BGSOUND SRC="sound.wav" LOOP=0><br />

2006-10-08 03:45:58 · answer #1 · answered by Solairaja A 2 · 1 0

go to your web page html (if you have one) and insert the html of the music where you put the website.with the website first and the music last.

2006-10-08 03:33:27 · answer #2 · answered by daphne e 1 · 0 0

All thease answers are good but they don't tell you were to put the tag.....


<-- put it here-->

------------------
Try coping this and pasting it just for a sample

now find a URL for you own song and replace it between the "" after src=

2006-10-08 08:47:17 · answer #3 · answered by Stephen G 2 · 0 0

Yes. It's an HTML Tag. The easiest software to use is FrontPage. It's point and click. Otherwise, you will have to program it yourself.

2006-10-08 03:26:56 · answer #4 · answered by Anonymous · 0 0

I do that with java applets.

2006-10-08 05:31:43 · answer #5 · answered by binaryFusion 5 · 0 0

try this:

2006-10-08 03:26:52 · answer #6 · answered by woojy 2 · 1 0

fedest.com, questions and answers