Web4College

HTML height attribute

height attribute specifies the vertical dimension (height) of the image, video, iframe, embed, object and div type elements.

Example
Try it
<p>Height specifies the height of iframe </p>
 <iframe src="files/start.html" height="400px" width="100%" >		
 </iframe>

Height specifies the height of iframe

Attribute values

All possible values of height attribute

The value of this attribute is a valid positive integer.

Related Tags

The tags that support height attribute

<embed> tag

embed tag embeds content in a page.

Example
Try it
<embed src="files/start.html" height="400px" width="100%">		

<iframe> tag

iframe tag adds an inline frame in a page.

Example
Try it
<iframe src="files/demo.html" height="400px"> </iframe>

<img> tag

img tag adds an image in a page.

Example
Try it
<img src="files/web.png" height="400px">

<object> tag

This element embeds external resources such as media, image, content to be processed by the plugin.

Example
Try it
<object data="files/start.html" height="400"> </object>

<video> tag

video tag adds video in a page.

Example
Try it
<video src="files/Hummingbird.mp4" height="350px" controls> </video>