" statement; 2. Use the "" statement; 3. Use " " statement."/> " statement; 2. Use the "" statement; 3. Use " " statement.">

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

How to add video in html

青灯夜游
青灯夜游Original
2021-05-06 14:31:5340174browse

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>

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>

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"/>

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!

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 hide p tag in htmlNext article:How to hide p tag in html