Suppose that I have a &l
According to MDN: Determining the dimensions of elements
offsetWidth
and offsetHeight
return the "total amount of space an element occupies, including the width of the visible content, scrollbars (if any), padding, and border"
clientWidth
and clientHeight
return "how much space the actual displayed content takes up, including padding but not including the border, margins, or scrollbars"
scrollWidth
and scrollHeight
return the "actual size of the content, regardless of how much of it is currently visible"
So it depends on whether the measured content is expected to be out of the current viewable area.