Notes on html heights

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the CSS-and-design category.

Last Updated: 2024-12-03

There are various measures of height given when inspecting elements in ChromeTools or interacting with JS.

Relationships between these heights

Geometry of an element with a scrollbar:

If unsure what element is the ancestor, JS will tell you with: el.offsetParent.id

References