Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

HTML <iframe> height Attribute

The height attribute on an <iframe> tag sets the height of the iframe element.

The height is specified in pixels - without the ‘px‘ unit.

Example

#

An <iframe> element with a height attribute.

<iframe src="https://www.wikipedia.org/wiki/Vincent_van_Gogh"
        height="450" style="width:100%;"></iframe>

Using height

The height attribute specifies the height of the iframe element.

The height is specified in pixels -- without the 'px' unit.

Percentages (%) are not allowed, but most browsers do support it.

The default height of an <iframe> element is 150px.


Syntax

<iframe height="value" />

Values

#

Value Description
value Height of the iframe in pixels.

Browser support

Here is when height support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <iframe>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides