HTML height property
Example
Define an image as a submit button with height and width attributes:
Try it »
Browser support





All major browsers support the height property.
Definition and Usage
The height attribute specifies the the height of the element.
**Note:** The height attribute only applies to the .
**Tip:** It is a good practice to specify the height and width attributes for an image. If these attributes are set, the required space is reserved for the image when the page loads. Without them, the browser cannot know the image's dimensions and cannot reserve appropriate space, so the page layout changes as the page and image load.
Differences between HTML 4.01 and HTML5
The height attribute is new in HTML5 for the tag.
Syntax
Attribute values
| Value | Description |
|---|---|
| pixels | The height in pixels (such as height="100"). |
HTML tag