Home > Article > Web Front-end > Video element in HTML5
Many trendy websites offer videos. HTML 5 provides a standard for displaying video.
Videos on the Web
Until now, there was still no standard that aimed at displaying videos on web pages. Today, most videos are displayed through plug-ins (such as Flash). However, not all browsers have the same plugins. HTML 5 specifies a standard way to include video through the video element.
HTML5 supported video formats
Currently, the video element supports three video formats:
Ogg = Ogg file with Theora video encoding and Vorbis audio encoding
MPEG4 = with H.264 MPEG 4 files with video encoding and AAC audio encoding
WebM = WebM files with VP8 video encoding and Vorbis audio encoding
How does it work?
To display a video in HTML 5, all you need is:
<video src="movie.ogg" controls="controls"></video>
The above is the content of the video element in HTML5. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!