How to put a background music on the website

How to put a background music on the website

The tag defines the musical file. The sounding duration, volume of music and additional characteristics are defined by means of tag attributes, or can be controlled scripts. The tag is posted only in the section . Instruction 1. Pass to that page where it is necessary to enable a mood music. Open its code and add the next line to the container : . Such parameters as balance, loop, src and volume act as attributes. The first regulates volume of sound in the right and left columns. It does not change dynamically with use of scripts. The loop attribute sets the number of playings of the musical file. At missing value, music is reproduced only once. The SCR attribute specifies path to the musical file. Expansions of valid files depend on the browser. Popular formats, such as MIDI, are supported without installation of third-party plug-ins. The last volume attribute is responsible for volume of sound. By default volume of sound is maximum and depends on settings of the operating system and the equipment. Therefore the sound level can only be reduced, assigning negative or positive value to an attribute. 2. You will expose to value attributes which satisfy with yours requirements. It is not obligatory to register all attributes, it is enough to specify path to the file (src). In that case settings will be by default. For example: Or to think up something the: 3. An alternative way which will force to play music in any browser it is possible to consider following. Minus of that is use of JavaScript.

Author: «MirrorInfo» Dream Team


Print