Current location - Music Encyclopedia - QQ Music - What is the HTML code of the background music of the webpage?
What is the HTML code of the background music of the webpage?

there are three HTML codes for background music of web pages, which are respectively <; bgsound> < /bgsound> 、< embed> < /embed> And <: audio> < /audio> Label.

due to <: bgsound> The feature of is nonstandard, so please try not to use it in production environment. The parameters of the three are introduced as follows:

1. <: bgsound> :

< bgsound> Is an element that sets the background music of web pages in IE browser.

< bgsound src="sound1.mid">

< Bgsound src = "sound2.au" loop = "infinite"

balance

The value of this property is from -1, to +1,, which determines how the volume is distributed among speakers.

loop

This attribute indicates the number of times the audio is played, and it is a numerical value or the keyword infinite.

2、< EMBED> :

< embed> Tags define embedded content, such as plug-ins, and how to insert audio and video.

< EMBED src="your.mid"autostart="true" loop="true" hidden="true"> ?

heightpixels sets the height of embedded content.

URL of p>srcurl embedded content.

typetype defines the type of embedded content.

widthpixels sets the width of embedded content.

3、< audio> :

< audio> Tags define sounds, such as music or other audio streams.

< audio src="someaudio.wav"> Your browser does not support the audio tag. < /audio>

Extended materials:

Complete collection of p>html special effects codes:

1) Mapping: <; Img src= "picture address" >

2) join the connection: <; A href= "related address to be connected" > Write the words you want to write <; /a>

3) Open the connection in a new window: <; A href= "related address" target="_blank"> Write the words to be written <; /a>

4) move font (lantern): < marquee> Write the words you want to write <; /marquee>

5) bold font: <; b> Write the words you want to write <; /b>

Baidu encyclopedia -bgsound?

Baidu encyclopedia -embed