HTML <iframe> heightAttributes
Examples
Specify an <iframe> with a height and width of 200 pixels:
<iframe src="http://www.w3cschool.cc/" width="200"
height="200">
</iframe>
</iframe>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the height attribute.
Definition and Usage
The height attribute specifies the height of the <iframe>, in pixels.
Differences between HTML 4.01 and HTML5
In HTML 4.01, the height should be defined in pixels or as a percentage of the containing element. In HTML5, the height value must be in pixels.
Syntax
<iframe height="pixels">
Attribute Values
| Value | Description |
|---|---|
| pixels | The height of the inline frame in pixels (e.g., "100px"). |
HTML <iframe> Tag Other Extensions