Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML video height Attribute

HTML

HTML video Tag Reference HTML

Example

A video with a specified height and width:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the height property.

Note: Internet Explorer 8 and earlier IE versions are not supported.


Definition and Usage

The height attribute specifies the height of the video player, in pixels.

Tip: It is a good practice to specify the height and width of a video. If these attributes are set, space is reserved for the video when the page loads. If they are not set, the browser cannot determine the video's dimensions in advance and cannot reserve appropriate space, so the layout may change while the page is loading.

Note: Do not use the height and width attributes to scale a video! Shrinking a video with these attributes only forces the user to download the original video (even if it appears smaller on the page). The correct approach is to compress the video with software before using it on your web page.


Differences between HTML 4.01 and HTML5


Syntax

Attribute values

Value Description
pixels A height value in pixels (such as "100px" or 100).

HTML video Tag Reference HTML