HTML5 “video” tag


Hi friends,

Today i learnt about HTML 5 “video” tag. This tag is new to HTML 5🙂

About “video” tag:

The <video> tag specifies video, such as a movie clip or other video streams.

A Simple HTML5 video:

Here the simple html5 code for on-line video,

<!-- The simple is the HTML5 program. Here we were using the new
"video" tag.The program 'll run the video on the web browser.
Program Name: html5_video_tag.html
Date written: 25.03.11
Date Modified: 30.03.11
Author: Tha.Suresh
-->

<!DOCTYPE HTML>
<html>
<body>

<video width="320" height="240" controls="controls">
<source src="http://tinyvid.tv/file/1bjuyg6rp4q71.ogg" type="video/ogg" />

Your browser does not support the video tag.
</video>

</body>
</html>

Running Notes:

  • Any text inside the between <video> and </video> will be displayed in browsers that does not support the video element.
  • The “control” attribute is for adding play, pause, and volume controls.
  • Currently HTML5  supports  “ogg, mp4 and webm” formats only.

Various Browser Supports HTML5:

Format IE Firefox Opera Chrome Safari
Ogg No 3.5+ 10.5+ 5.0+ No
MPEG 4 9.0+ No No 5.0+ 3.0+
WebM No No 10.6+ 6.0+ No

Preview:

If you want fun just cop y the code and save as “html” file and open it your firefox browser. This video won’t run in IE and safari. Because its “ogg” format file.😛

Preview of video running in browser via HTML5 Prog.,

2 thoughts on “HTML5 “video” tag

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s