HTML——28.音频的引入

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>音频引入</title>
	</head>
	<body>
		<!--audio:在网页中引入音频
			当属性名和属性值一样,可以只写属性名
			src属性:指定音频文件路径,必须要有
			controls属性:显示播放控件,属性名和属性值一样,可以只写属性名
			autoplay属性:音频在就绪后自动播放
			<audio src="m/wdzg.mp3"></audio>音乐引入是默认不给你播放的,需要加播放控制按钮controls
			
			-->
		
		<audio src="m/wdzg.mp3"   controls  autoplay></audio>
		
	</body>
</html>

当属性名和属性值一样,可以只写属性名

< audio src="m/wdzg.mp3" controls="controls" autoplay="autoplay">

相关推荐
祝余呀5 分钟前
HTML初学者第四天
前端·html
rzl028 小时前
HTML/JOSN复习总结
前端·html
Sapphire~1 天前
重学前端004 --- html 表单
前端·html
gzzeason1 天前
在HTML中CSS三种使用方式
前端·css·html
荔枝hu1 天前
springboot生成pdf方案之dot/html/图片转pdf三种方式
spring boot·pdf·html
灵犀学长2 天前
解锁HTML5页面生命周期API:前端开发的新视角
前端·html·html5
兴趣使然_2 天前
【笔记】使用 html 创建网址快捷方式
笔记·html·js
Zachery Pole2 天前
BootStrap
前端·bootstrap·html
淮北4942 天前
最简单的实验室资产管理系统,使用Flask,mysql,html(四、知识补充)
mysql·flask·html
多啦C梦a2 天前
【前端必修】闭包、`this`、`箭头函数`、`bind`、节流,一篇文章全懂!
前端·javascript·html