You can use the "
The operating environment of this tutorial: Windows7 system, HTML5 version, Dell G3 computer.
HTML5 provides playback Standard for audio files.
<!DOCTYPE HTML>
<html>
<body>
<audio src="horse.ogg" controls="controls">
您的浏览器不支持音频元素。
</audio>
</body>
</html>
Description:
tag defines a sound, such as music or other audio stream.
The src attribute specifies the URL of the audio to be played.
Syntax:
<audio src="URL">
Audio formats and browser support:
Currently, the element supports three audio format files: MP3, Wav, and Ogg:
[Recommended tutorial: "html video tutorial 》】
The above is the detailed content of How to use html to implement music playback. For more information, please follow other related articles on the PHP Chinese website!
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