How To Use HTML5 | Include Files | Video Tags | HTML5 Video Tutorial
How does html5 video tag makes the difference?
The <video> tag is one of the most exciting and awaited feature of HTML5, there is no doubt that this video tag would make adding and viewing much easier. When we visit Youtube we can find that there are links by the side of a video clip to embed it to another web-page. Actually, there is no magic in this technology, it simply plays the video through Adobe’s Flash files. There are several other third-party players like realplayer, Quicktime etc. The plug-ings to support them are usually already installed separately in your browser. You mite notice that in some old computers Youtube cannot play the video because Adobe Flash plug in is not installed. The new html5 <video> tag eliminates all this complexity and enables you to play the video files in any browser without having an additional plugin installed.
Creating a supported Video File to embed using html5 video tag.
Before starting off to learn how to use the markups for embedding video in html5, you should keep in mind that all browsers don’t support every file formats. There are quite a lot of video file formats existing today and its quite difficult to create the <video> tag which can support all of them together ( may be now you got the real reason why you should be excited about the <video> tag in the first place). Today, the support for specific formats vary from browser to browser. So first we’ve to learn to create a the video files in the format which are supported by the specific browser. The table shows specific formats supported by each browsers. Naturally, you would by having this question in mind “So the video files embedded using <video> tag doesn’t play in all browsers?”. Yes, there are techniques for this, but for the time being lets learn the basics.
Video Formats Subpported by Browsers for HTML5
How to use the html5 tag?
There are two ways to embed a file in html5 <video> tag. Single and Multiple. If you have only one video file you can simply link it to the src attribute. It is just as same as displaying the image <img src=”…”>.
To display One Video
To adjust size :
<video src=”hello.webm” width=”320” height=”240”></video>
This <video> element doesn’t include any sort of player controls. You can include them your own in attractive ways by using CSS and Javascrip. The <video> element has methods like play() and pause(). If you want the browser to display a default control just ask it to display the built-in set of controls.
<video src=”hello.webm” width=”320” heigh=”240” controls></video>
Displaying Multiple Video Files In HTML5
<video width="320" height="240" controls> <source src="hello.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> <source src="hello.ogv" type='video/ogg; codecs="theora, vorbis"'> <source src="hello.webm" type='video/webm; codecs="vp8, vorbis"'> </video>
Be The First To Share HTML5!
You can be the first to one to let your peer computer enthusiasts know about html5 by sharing this on facebook and twitter at the top of this page. Do post your comments and doubts on the topic, i'll soon clear it off and help you out!If you found this article helpful, you can 'vote me up' in the green oval below.
The benefit of this trouble is that only the format supported by the browser is played, the rest is not even downloaded. This is also one way to make your video play in any format. These are technically all the things you need to implement <video> tags in html5. Hope you liked the tutorial.
More by this Author
Dr. W. Edward Deming is regarded as the initiator of quality revolution in Japan. His findings are statistical and give powerful insights of excellent quality management; in his book “Out of the crisis” we...
Borland C Graphics Tutorials Explained In very Simplified Manner.Describes the use of C grapics library, C graphics.h header files.Cover all the Graphics programming basic concepts and C Graphics functions used...
Learn about the Best Nanotechnology Companies To Invest In 2015. Exclusive review of the Top Nanotechnology companies stocks, segregating facts from myths is the basic motive of this article. First of all, we need to...