" statement; 2. Use the "" statement; 3. Use " " statement."/> " statement; 2. Use the "" statement; 3. Use " " statement.">
Home > Article > Web Front-end > How to add video in html
htmlHow to add a video: 1. Use the "" statement; 2. Use "" statement; 3. Use the "" statement.
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>
2. Use the
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
The
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!