Article introduction of Wulin.com (www.vevb.com): The application of HTML5 daily audio tag.
In the past, if we wanted to play music on the web, we basically played it through Flash, but not all browsers installed Flash player plug-in. Now, in HTML5, we can completely play music without Flash or other plug-ins.
audio tags:
Currently, HTML5 audio tags only support 3 audio formats, as shown in the following table:
IE9
FireFox 5.0
Safari 5.5
Chrome 12
Opera 11.5
Mp3
√
×
√
√
×
Ogg
×
√
×
√
√
Wav
×
√
√
×
√
The properties of Audio tags are:
property
Value (can be omitted)
describe
src
url
The URL of the audio to be played can be a network path or a relative path.
Controls
Controls
Shows controls to the user, such as play button.
loop
loop
Playback restarts whenever the audio ends.
preload
preload
The audio is loaded when the page is loaded and ready to be played. If autoplay is used, this property is ignored.
autoplay
autoplay
The audio will be played immediately after it is ready.
<h1> I think the song "Great Plateau" is good recently, so I used it in the case:</h1>
<audio src=?xcode=0f479d949c4372d1165aae570e00d8bd&mid=0.76911343441060 controls=controls autoplay=true>Your browser does not support the audio tag. </audio>