HTML height attribute

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

Example

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

height attribute values

The value of this attribute is a valid positive integer.

Related Tags

The tags which support this attribute are as follows.

<embed> tag

embed tag embeds content in a page.

Example

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

Try</>

<iframe> tag

iframe tag adds an inline frame in a page.

Example

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

Try</>

<img> tag

img tag adds an image in a page.

Example

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

Try</>

<object> tag

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

Example

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

Try</>

<video> tag

video tag adds video in a page.

Example

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

Try</>


Was this article helpful?

 

Email:

Message:

Get the newsletter