How to add music in html

青灯夜游
Release: 2023-01-06 11:16:28
Original
38804 people have browsed it

htmlHow to add music: 1. Use the "" statement; 2. Use "" statement; 3. Use the "" statement.

How to add music in html

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

1. Use HTML5

Example:

<!DOCTYPE HTML>
<html>
<body>

<audio src="/i/horse.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

</body>
</html>
Copy after login

How to add music in html

2. Use the element

The following code snippet can display MP3 files embedded in web pages:

<embed    style="max-width:90%" width="100" src="horse.mp3">
Copy after login

3. Use the element

The following code snippet can display MP3 files embedded in web pages:

<object height="50" width="100" data="horse.mp3"></object>
Copy after login

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to add music in html. 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