English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete list of HTML tags

HTML: <video> height attribute

The height attribute specifies the height of the video player in pixels. Always specify both the height and width attributes of the video. If both height and width are set, the space required by the video is reserved when the page is loaded.

 HTML <video> tag

Online example

Simultaneously refers to a video with specified height and width:

<video width="380" height="280" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>
Test to see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the height attribute.

Note: Internet Explorer 8 and earlier IE versions do not support the <video> tag.

Definition and Usage

The height attribute specifies the height of the video player in pixels.
Tip:Always specify both the height and width attributes of the video at the same time. If both attributes are set, the space required by the video will be reserved when the page is loaded. However, if these attributes are not set, the browser will not know the size of the video and cannot reserve the appropriate space for it. The result is that the page layout will change during loading (when the video is loading).
Note:Do not use the height and width attributes to resize the video! Using the height and width attributes to shrink the size of a large video will force the user to download the original video (even if it looks small on the page). The correct way to resize the video is to use a program, then use it on the page.

HTML 4.01 between HTML5differences

The <video> tag is part of HTML5 New tag.

Syntax

<video height="pixels">

Attribute Value

ValueDescription
pixelsHeight value in pixels (for example "100px" or 100).
 HTML <video> tag