Element.scrollHeightread-only attribute is a measurement of the height of an element's content, including content not visible on the screen due to overflow. The
scrollHeightvalue is equal to the minimum
height (where height includes padding but does not include border and margin)the element would require in order to fit all the content in the viewpoint without using a vertical scrollbar. It includes the element padding but not its margin.