Home Tutorial Html Html5 HTML5 video height width.

 
 

Share on Google+Share on Google+
HTML5 video height width.
Posted on: September 15, 2010 at 12:00 AM
Advertisement
In this tutorial, we will introduce you to about width and height attribute of video tag.

HTML5 video height width.

Introduction:

The <video> tag use for embedding video in a web page. It has many attribute. But in this tutorial, we will introduce you to about the height and width attribute . They define height and width of media.

Attribute of video tag:

Attributes Value Description
height pixel Define height of media.
width pixel Define width of media.

Declaration Syntax :

Declaration syntax of height and width attribute of video  tag in HTML5.

<video poster="Image URL" > Content </video >
                         OR
<video srd="URL" >Content </video >

Example of height and width attribute in HTML5:

Code:
HeightWidth_Tag.html
<!doctype html >
<html >
<head>
<title>Video Tag attributes.</title>
</head>
<body><p>
<b>Implementation of height and width attribute of video tag in HTML5.
</b></p>
<video src="Video1.mp4" controls height="200px" width="250px">
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 height width.:


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