HTML 5 supports <video> tag also. The HTML video tag is used for streaming video files such as a movie clip, song clip on the web page.
Currently, there are three video formats supported for HTML video tag:
- mp4
- webM
- ogg
Let’s see the table that defines which web browser supports video file format.
| Browser | mp4 | webM | ogg |
|---|---|---|---|
Internet Explorer | yes | no | no |
Google Chrome | yes | yes | yes |
Mozilla Firefox | yes | yes | yes |
Opera | no | yes | yes |
Apple Safari | yes | no | no |
Android also supports mp4 format.
HTML Video Tag Example
Let’s see the code to play mp4 file using HTML video tag.
<video controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the html video tag.
</video>
Let’s see the example to play ogg file using HTML video tag.
<video controls>
<source src="movie.ogg" type="video/ogg">
Your browser does not support the html video tag.
</video>
Supporting Browsers
| Element | Chrome | IE | Firefox | Opera | Safari |
| <video> | Yes | Yes | Yes | Yes | Yes |
Internet Explorer
Google Chrome
Mozilla Firefox
Opera
Apple Safari