Home > Web Front-end > HTML Tutorial > Use of

Use of

黄舟
Release: 2017-06-19 16:31:23
Original
3552 people have browsed it

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>
Copy after login

2. Code with incompatibility reminder

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

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>
Copy after login

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
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template