English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the HTML iframe height attribute to specify the height of the <iframe> in pixels, with an online example demonstrating how to use the HTML iframe height attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
Set iframe width to 450 pixels, height280 pixels:
<iframe src="https://www.oldtoolbag.com/" width="450" height="280"></iframe>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the height attribute.
The height attribute specifies the height of the <iframe> in pixels.
In HTML 4.01In HTML, the height can be defined in pixels or as a percentage of the containing element.5In the syntax, the value must be specified in pixels.
<iframe height="pixels">
Value | Description |
---|---|
pixels | The height of the inline frame in pixels (for example "100px |