"."/> ".">

Home >Web Front-end >HTML Tutorial >How to insert video in html

How to insert video in html

藏色散人
藏色散人Original
2021-03-31 11:04:4491133browse

htmlHow to insert a video: first create an HTML sample file; then enter the video tag in the body; finally pass "" Just insert the video.

How to insert video in html

The operating environment of this article: Windows 7 system, HTML5&&CSS3 version, DELL G3 computer

In HTML, use the video tag to insert a video. The

HTML5 supports playing audio and video files directly in the browser without using the Adobe Flash plug-in.

Disadvantages of plug-ins: Plug-ins are one of the main reasons for browser crashes, especially flash, which has many problems.

Currently, the

Tip: You can place text content between the tags so that browsers that do not support the

How to insert video in html

MP4 = MPEG 4 files using H264 video codec and AAC audio codec

WebM = WebM files using VP8 video codec and Vorbis Audio codec

Ogg = Ogg files use Theora video codec and Vorbis audio codec

MIME type for audio format

How to insert video in html

Attribute value:

How to insert video in html

Example:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</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>

Rendering:

How to insert video in html

Recommended learning: 《HTML video tutorial》《css video tutorial

The above is the detailed content of How to insert 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