The way to add a video in HTML is to add a
The operating environment of this article: windows10 system, html 5, thinkpad t480 computer.
It is very simple to insert a video in html, because we have a ready-made video tag, through which we can easily achieve the effect of inserting a video.
Let’s take a look at the video tag. The
At the same time, the
The content inserted between the
Let’s take a look at the code example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> 您的浏览器不支持 HTML5 video 标签。 </video> </body> </html>
Let’s take a look at the running effect:
Related recommendations: html video tutorial
The above is the detailed content of How to put video in HTML. For more information, please follow other related articles on the PHP Chinese website!