QuizNot attempted
offsetWidth vs clientWidth vs scrollWidth
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
offsetWidth
offsetWidthis the rendered box: content + padding + border (+ scrollbar).- Not clientWidth: content + padding only, it excludes the border.
- Not scrollWidth: the full scrollable content width including overflow, also border-excluded.
- Not clientLeft: that is just the left border's thickness (10px), not the element's width.