HCLTech Interview Question

What is Box model in web dev?

Interview Answer

Anonymous

Feb 14, 2025

The CSS Box Model defines how elements are sized, positioned, and rendered on a webpage. When a browser loads an HTML document, it creates a DOM tree and assigns a box to each element. This box calculates the element’s dimensions and position relative to its parent or the root element, ensuring accurate layout and spacing.