How to insert music on the website

How to insert music on the website

Digital Hits: 62

When the person creates own website, various thoughts come to mind. They concern both design, and filling of pages. These are the various text blocks disclosing the content or the ideas of the author, a photo and videos supporting or enhancing semantic effect. There is also such desire how to equip the website with a mood music – from a background music before personal voice request of the author to visitors.



All this is possible and not too difficult. To insert music on the website correctly, it is necessary to remember how the ordinary image is inserted. Business in volume, sound files on the page are located just as pictures and photos. Only pictures have permission of jpg or gif, and sound files – wav or a MP3.

We select for placement or we write the sound file, and then we place it in the folder on the hard drive with files of your website. It is the best of all to create the separate folder with sounds, for example Sound. To add the sound file it on the page of the website, we register the next line:

 

<href= "" Sound/name of musical файла.wav""> Name of music </a>

 



Just as when loading the picture, on the page the link to the downloaded music (sound access) will appear. For its listening it is necessary just to click it, i.e. the music will be turned on at the command of the visitor of the website. If there is desire to make a musical background, then it is necessary to write and place the following command on the page of the website:

 

<BGSOUND SRC= "" Sound/name файла.wav"">

 



Now when loading the page, the musical file will be started automatically. At such placement the file will be lost once and will stop. To increase sounding time, it is possible to specify how many times music will be played back, for example 4. For this purpose we alter the previous command, having specified the number of repetitions:

 

<BGSOUND SRC= "" Sound/name файла.wav"" LOOP=4>

 



That the soundtrack sounded all the time which visitors will spend on your website, it is necessary to specify the following parameter:

 

<BGSOUND SRC= "" Sound/name файла.wav"" LOOP=INFINITE>

 



Besides, it is possible to manage the volume and stereobalance of the musical file. The volume and balance commands are responsible for it. Volume (sound) accepts values from-10000 to 0. In other words, it cannot be made louder, and it is possible to muffle a sound only. At the Balance command (stereobalance) - permissible values from-10000 to 10000. When choosing any value, excellent from "0", the sound will be displaced from one loudspeaker to another.

If the sound file too loud, then it is possible to write the next line:

 

<BGSOUND SRC= "" the Sound/name файла.wav"" LOOP=10 VOLUME = - 5000 BALANCE=0>

 



It means that the soundtrack will sound exactly 10 times in a half of the volume and equal stereobalance.



 

Author: «MirrorInfo» Dream Team

Print