There are two options available: .clientHeight
and .offsetHeight;
.
But, do you know the distinction between them?
.clientHeight
takes padding into account.
.offsetHeight
considers padding, scrollBar, and borders in its calculation.
var clientH = document.getElementById('example').clientHeight;
var offsetH = document.getElementById('example').offsetHeight;
console.log(clientH);
console.log(offsetH);
<div style="height: 30px;" id="example">
<p>aaaaaaa</p>
<p>bbbbbbb</p>
<p>ccccccc</p>
<p>ddddddd</p>
</div>