html get height including margin height code example
Example: how get height elemnt with that margin in js
//get the margin of an element,
// {{ use the getComputedStyle() method }}
let box = document.querySelector('div'); // my div
let style = getComputedStyle(box); // my div style
// all side margin
let marginLeft = parseInt(style.marginLeft);
let marginRight = parseInt(style.marginRight);
let marginTop = parseInt(style.marginTop);
let marginBottom = parseInt(style.marginBottom);