Latest web development tutorials

HTML iframe height property

HTML iframe tag Reference Manual HTML <iframe> tag

Examples

Specify the height and width of 200 pixels <iframe>:

<iframe src="http://www.w3cschool.cc/" width="200" height="200">
</iframe>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support height attributes.


Definition and Usage

height attribute specifies the <iframe> height 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 as a unit. In HTML5, the height value must be in pixels.


grammar

<iframe height="pixels">

Property Value

描述
pixels 以像素为单位的内联框架的高度(比如 "100px")。


HTML iframe tag Reference Manual HTML <iframe> tag