HTML DOM Video height property
Examples
Modify the height of the video:
try it"
Definition and Usage
height property sets or returns the height property value.
height attribute describes the height of the video, in pixels.
Tip: predetermined width and height of the video is a good habit.If you set these properties, when the page loads will set aside space for the video. If you do not set these properties, the browser can not be pre-determined dimensions of the video, so you can not reserve a suitable space for the video. As a result, in the process of loading the page, its layout will change.
Note: Do not scale the video by height and width attributes!By height and width attributes to narrow the video will only force the user to download the original video (even though it looks small on the page). Before the correct approach is to use the video on the page, using the software for video compression.
Browser Support
All major browsers support height attribute
Note: Internet Explorer 8 and earlier versions of IE do not support the <video> element.
grammar
Back height attributes:
Setting the height property:
Property Value
value | description |
---|---|
pixels | Describes the height of the video, in pixels (example: width = "100") |
technical details
return value: | Number that is the height of the video, in pixels |
---|
More examples
Examples
Gets the height of the video:
try it"
Related Pages
HTML Reference Manual: HTML <Video> height property
Video Object