![]() |
VOOZH | about |
HTML DOM Style height Property is similar to CSS Height Property but it is used to set or get height of an element dynamically.
Syntax :
object.style.height = auto|length|%|initial|inherit;
object.style.height
Property Values:
| Value | Description |
|---|---|
| auto | Default value |
| length | This define height in length unit |
| % | This define height in percentage compare with the parent element. |
| initial | sets its default value |
| inherit | inherit the property from parents |
Return Value: String that gives height of the element.
Example-1:
Output
Example-2:
Output :
Supported Browsers: The browser supported by DOM Style height property are listed below: