How to: Html5 Video tags compatible to all major browsers

In this tutorial I will show you the exciting new feature of HTML5. HTML5 is not yet an official standard, there are some problems with browsers to correctly show the effects of HTML5 new tags.

In HTML5 you can include your videos in a very simple manner but as I mentioned above this tag also have some compatibility issue with respect to browsers so here I will show you video tags that are compatible to all major browsers like Firefox,Chrome,Internet Explorer .

<!DOCTYPE HTML>
<html>
<body>
<video controls="controls">
<source src="AjaxUpdatePanel.mp4" type="video/mp4" />
<source src="AjaxUpdatePanel.ogv" type="video/ogg" />
 </video>
</body>
 </html>

 

In the above code snippet the video tag that is using .ogv video format will run your video in firefox browser without any problem and the video tag that is using .mp4 format will run your video in Internet Explorer 9 and in chrome as well.

So use above code and share your experience with me through comments.

Tagged: , ,
  • http://www.facebook.com/profile.php?id=100000786512779 Ahmed Ali

    I feel it still very stupid, HTML5 is still in progress, why do the FF/IE/Chrome and all the web browsers coders do not apply one standard? why do I need to use version of code for FF and another for IE?
    They have to solve this convenience on their end and save designers/programmers live.

    • http://codereflex.net Syed Asad Ahmed

      Hey Ahmed Ali:

      Thanks for your comment. Keep visiting CodeReflex.net as in my next post I will show to play videos by using only one html5 tag for all browsers.

    • Asad

      Hey Ahmed Ali:

      Thanks for your comment. Keep visiting CodeReflex.net as in my next post I will show to play videos by using only one html5 tag for all browsers.

  • Msvayani

    It is universally true that people are a bit lazy to install updates on their computers. For instance, I have seen many people still using IE6 on their computers. I think, this is the reason they have not set HTML5 as a default HTML.

    • http://codereflex.net Syed Asad Ahmed

      Thanks Msvayani for your valuable comment. Yes you are absolutely right that “people are a bit lazy to install updates on their computers”. Please keep visiting CodeReflex.net as in my next post I will show you how can you run your videos in all browsers including older versions.

    • Asad

      Thanks Msvayani for your valuable comment. Yes you are absolutely right that “people are a bit lazy to install updates on their computers”. Please keep visiting CodeReflex.net as in my next post I will show you how can you run your videos in all browsers including older versions.

  • Pingback: Play video for all browser using html5 | CodeReflex.net

GetSocial