]."/> ].">

Home  >  Article  >  Web Front-end  >  How to put video in HTML

How to put video in HTML

王林
王林Original
2021-06-17 16:26:5710795browse
The way to add a video in HTML is to add a

How to put video in HTML

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 tags is provided for display by browsers that do not support the video element.

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:

How to put video in HTML

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!

Statement:
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
Previous article:How to set tilt in htmlNext article:How to set tilt in html