Easy Tutorial
❮ Tag Sub Att Frame Frameborder ❯

HTML <video> height Attribute

HTML <video> Tag

Example

A video with specified height and width:


Browser Support

All major browsers support the height attribute.

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


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 the video. If these attributes are set, space is reserved on the page when the page is loaded. If these attributes are not set, the browser cannot know the size of the video in advance, and thus cannot reserve appropriate space. The result is that the layout of the page changes during the loading process.

Note: Do not scale the video using the height and width attributes! Scaling down the video using these attributes will only force users to download the original video (even if it appears smaller on the page). The correct method is to compress the video using software before using it on the webpage.


Differences Between HTML 4.01 and HTML5

The <video> tag is new in HTML5.


Syntax

Attribute Values

Value Description
pixels The height value in pixels (e.g., "100px" or 100).
❮ Tag Sub Att Frame Frameborder ❯