Until now, there has never been a standard for showing video on a web page.
Today, most videos are shown through a plugin (like flash). However, not all browsers have the same plugins.
HTML5 specifies a standard way to include video, with the video element.
Currently, there are 4 supported video formats for the video element:
To show a video in HTML5, this is all you need:
The control attribute is for adding play, pause, and volume controls.
It is also always a good idea to include the width and height attributes.
Insert content between the <video> and </video> tags for browsers that do not support the video element:
The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.
To make the video work in Safari and future versions of Chrome, we must add a MPEG4 and WebM file.
The video element allows multiple source elements. Source elements can link to different video files. The browser will use the first recognized format:
Internet Explorer 8 does not support the video element. In IE 9, there will be support for video element using MPEG4.
Your Query was successfully sent!