Home Tutorial Html Html5 HTML5 video element, Implementation of <video> tag.

 
 

Share on Google+Share on Google+
HTML5 video element, Implementation of <video> tag.
Posted on: September 15, 2010 at 12:00 AM
Advertisement
The <video> tag is used for adding video or media file in HTML document.

HTML5 video element, Implementation of <video > tag.

Introduction:

The <video> tag is used for adding video or media file in HTML document. It is not present in HTML4.01. It is not only for video, you can use audio or image. You can write content inside the video tag. It will be display only, when browser do not support video tag. If you use image instead of video, then you use poster attribute for address of Image.

Attribute of video tag:

Attributes Value Description
autoplay autoplay Video will start automatically play.
autobuffer autobuffer Video will start automatically buffer.
controls controls for showing controls.
loop loop for repetition of media data.
height pixel Define height of media.
poster URL of a image Address of image.
src URL(video, audio) Address of media.
width pixel Define width of media.

Declaration Syntax :

Declaration syntax of video tag in HTML5.

<video src="URL" > </video >
                            OR
<video >
                    <source src="URL" >  
                          <source src="URL">  
                                   ...................................
          </video >

Example of <video> in HTML5:

Code:
Video_Tag.html
<!doctype html >
<html >
<head>
<title>Video Tag </title>
</head>
<body>
<p><b>Example of video tag in HTML5.</b></p>
<video src="1.mp4" controls >
Browser does not support video tag.
</video >
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The video tag  is only available in HTML5. It is not available in HTML4.01.

Advertisement

Related Tags for HTML5 video element, Implementation of <video> tag.:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 15, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com