How to add music to html web page

青灯夜游
Release: 2021-06-21 16:16:18
Original
9237 people have browsed it

Method: 1. Use the "" statement; 2. Use " " statement; 3. Use the "" statement.

How to add music to html web page

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

Add music to HTML web page

Method 1:

	<audio autoplay="autoplay" controls="controls"loop="loop" preload="auto"
            	src="http://demo.mimvp.com/html5/take_you_fly.mp3">
      		你的浏览器版本太低,不支持audio标签
	</audio>
Copy after login

This method will display the playback device.

Method 2:

<embed src="music/We Don&#39;t Talk Anymore.mp3" autostart="true" loop="true" hidden="true"></embed>
Copy after login

This method mainly supports many players. Solved the browser compatibility issue to a certain extent.

Method three:

<bgsound src="音乐保存的绝对路径" autostart=true loop=infinite>
Copy after login

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to add music to html web page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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