1// Get Content + Padding + Border
2let box = document.querySelector('div');
3let width = box.offsetWidth;
4let height = box.offsetHeight;
5
6// Get Content + Padding only
7let box = document.querySelector('div');
8let width = box.clientWidth;
9let height = box.clientHeight;