HTML DOM offsetHeight Property (original) (raw)

Last Updated : 13 Jun, 2023

The DOM offsetHeight property is used to return the layout height of an element as an integer. It is measured in pixels. It includes height, border, padding, and horizontal scrollbars but not margin. If the element is hidden then it returns 0.

Syntax:

element.offsetHeight

Return Value: It returns the layout height of an element as an integer.

Example 1: In this example, we will use DOM offsetHeight Property

HTML `

DOM Style offsetHeight Property

DOM offsetHeight Property

Information about this div:

Submit

`

Output:

Example 2: In this example, we will use DOM offsetHeight Property

HTML `

DOM Style offsetHeight Property

DOM offsetHeight Property

Information about this div:

Submit

`

Output :

Supported Browsers: The browser supported by DOM offsetHeight property are listed below: