HTML Video Tag


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:

  1. mp4
  2. webM
  3. ogg

Let’s see the table that defines which web browser supports video file format.

Browsermp4webMogg
ie browser Internet Exploreryesnono
chrome browser Google Chromeyesyesyes
firefox browser Mozilla Firefoxyesyesyes
opera browser Operanoyesyes
safari browser Apple Safariyesnono

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

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<video>YesYesYesYesYes

Leave a Reply

Your email address will not be published. Required fields are marked *