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

How to add video in html

青灯夜游
Release: 2023-01-05 16:13:27
Original
40179 people have browsed it

htmlHow to add a video: 1. Use the "" statement; 2. Use "" statement; 3. Use the "" statement.

How to add video in html

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

There are many ways to play videos in HTML.

1. Use the

The following HTML snippet displays a video in ogg, mp4 or webm format embedded in a web page:

Example

<video>
 您的浏览器不支持 video 标签。
</video>
Copy after login

How to add video in html

2. Use the tag

The tag is used to embed multimedia elements in HTML pages.

The following HTML code displays a Flash video embedded in a web page:

Example

<embed></embed>
Copy after login

Problem

  • HTML4 does not recognize

  • If the browser does not support Flash, the video will not playback

  • iPad and iPhone cannot display Flash videos.

  • If you convert the video to other formats, then it still won't play in all browsers.

3. Use the tag

The tag is used to embed multimedia elements in HTML pages.

The following HTML fragment displays a Flash video embedded in a web page:

Example

<object data="movie.swf" height="200" width="200"/>
Copy after login

Problem

  • If the browser does not support it Flash, will not be able to play the video.

  • iPad and iPhone cannot display Flash videos.

  • If you convert the video to other formats, then it still won't play in all browsers.

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to add video in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template