HTML video Tag height Attribute Tutorial

In this section, we will learn what the height attribute is and how to use it.

What is height Attribute in HTML <video> Tag?

We use the height attribute when we want to set the height of the target video player.

It’s a good practice to always set the size of a video player (including its width) so that browsers know how much space that video player takes in a document.

The value we set for this attribute could be any number of HTML supported units.

HTML height Attribute in <video> Tag Syntax:

<video height = “number”> </video>

<video> Tag height Attribute Values

The value we set for the height attribute is numbers with HTML absolute or relative units.

Example: using height attribute in HTML <video> tag

See the Pen using height attribute in HTML <video> tag by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies