我尝试在我的页面上添加带有 HTML 的 YouTube 视频,但它不起作用
<video width="300px"
height="300px" controls>
<source
src"https://YouTube.be/y8yv4pn
o7qc" type="video/mp4>
<video width="300px"
height="300px" controls>
<source
src"https://YouTube.be/y8yv4pn
o7qc" type="video/mp4>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标签适用于计算机上的本地文件。另外,请确保正确设置元素格式,如本网站所示:https://www.w3schools。 com/html/html5_video.asp。
如果您要下载视频并在项目中使用它,它会如下所示:
如果您想使用 Youtube 视频,则标签为:
。以下是文档:https://www.w3schools.com/html/html_youtube.asp。这是一些示例代码:
The
<video>
tags are for local files on your computer. Also, make sure to format correctly the element like in this website: https://www.w3schools.com/html/html5_video.asp.If you were to download a video, and use it in your project, it would look like this:
If you want to use Youtube videos, the tag is:
<iframe>
. Here is the documentation: https://www.w3schools.com/html/html_youtube.asp. Here is some sample code: