The html5 tutorials

 
About HTML5
Home
Introduction to HTML5
Features of HTML5
Older versions Vs. HTML5
 
Tags  
source
article
aside
audio
canvas
command
datalist
details
embed
figcaption
figure
footer
header
hgroup
keygen
mark
meter
nav
output
progress
ruby
section
summary
time
video
wbr
 

VIDEO Tag

Video tag is symbolized as <video> that is used to define videos including movie clips and other video streams etc. The procedure to insert video is just as similar as image. You can now use it with JavaScript and CSS. The various plug-ins like Flash or Quicktime.

Example code:

<video controls>
<src="video.AVI" type="video/ AVI" /> <!-- WMV for Chrome -->
<src="video.ogg" type="video/ogg" /> <!-- Ogg Theora for FireFox -->
</video>

If in case, no video data is available then either the poster frame or nothing will be appeared in the video element. Whereas, when a video element is paused, then element will show either the poster frame or current playback position frame.

Thus, the video tag is used to play video files in the web page which until now depended on third party plug-ins like flash

Attributes Of Video Tags

  • Auto-play: The video will be played just after the page loads.
  • Auto-buffer: By default (without this attribute), the video file is not downloaded unless you click on the play button. Adding this attribute starts downloading the video just after the page loads.
  • Controls: by default (without this attribute), the video doesn’t include any controls (play/pause button, volume, etc.). Use this attribute if you want the default controls.
  • Height/width: The size of the video