You are here: Reference > HTML > attributes > height (embed, iframe, img, table, ...)

height attribute (embed, iframe, img, table, ...)

Browser support:
Specifies the height of an element.
This attribute is deprecated. Use the height style property instead.
JavaScript page for this attribute: height. You can find other example(s) there.

Possible values:

Sets the height of the object.
One of the following values:
Integer that specifies the height of the object, in pixels.
Integer in the range 0-100 followed by a %.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the height attribute:
<img id="myImage" src="picture.gif" height="100px" width="100px" />
Did you find this example helpful? yes no

Example HTML code 2:

<img id="myImage" src="picture.gif" style="height:100px; width:100px;" />
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content