Home  >  Article  >  Web Front-end  >  Use of

Use of

黄舟
黄舟Original
2017-06-19 16:31:233464browse

In HTML5 standard web pages, we can use the audio tag to complete our call and playback of sounds. The following are the three most common basic formats for using HTML5:

1. Minimal code

<audio src="song.ogg" controls="controls"></audio>

2. Code with incompatibility reminder

<audio src="song.ogg" controls="controls">
Your browser does not support the audio tag.
</audio>

3. Try to be compatible with browser writing

<audio controls="controls">
<source src="song.ogg" type="audio/ogg">
<source src="song.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>

Before the emergence of the HTML5 standard, programmers could not play audio files as easily as using the tag. To solve this problem, HTML5 provides a new tag

HTML5

Use of <audio> tag in html

##HTML5

The above is the detailed content of Use of

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn