Home  >  Article  >  Web Front-end  >  Video element in HTML5

Video element in HTML5

黄舟
黄舟Original
2016-12-22 15:30:061499browse

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:

Video element in HTML5

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)!


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:Canvas element in HTML5Next article:Canvas element in HTML5