Home > Web Front-end > H5 Tutorial > body text

Example code for h5 video tag usage

零下一度
Release: 2018-05-15 10:30:20
Original
5279 people have browsed it

HTML video is suitable for HTML 5+ and is used to define video streaming media for online viewing. Here is a brief introduction for the convenience of friends who need it

HTML

<video 
width
="320" 
height
="240" src="www.php.cn/movie.ogg" controls="controls">
Copy after login

This is the comment text. If the browser cannot support HTML 5, the text here will be displayed. If supported, the video will be displayed directly and the text will be ignored.

In HTML 4 and before, if you want to embed a video for online viewing in a web page, you generally need to use Flash video streaming, by using and tag, you can play video files in swf, flv and other formats through the browser, but the premise is that the browser must install a third-party plug-in: Adobe Flash Player. Modern smartphones and iPads generally cannot support Flash, so they cannot browse videos on the web. HTML 5 has changed this fact. Web developers only need to use the