What is the CSS box model?
Every element is a box made of content, padding, border and margin. The default content-box size counts only the content; border-box includes padding and border in the width you set.
Frontend 路 Intern to senior
CSS interviews check that you can build and debug layouts without guessing: how the box model and specificity work, when to use Flexbox or Grid, and how positioning and units behave.
3 of 9 questions match
Clear filtersEvery element is a box made of content, padding, border and margin. The default content-box size counts only the content; border-box includes padding and border in the width you set.
display: none removes the element from the layout so it takes no space; visibility: hidden hides it but leaves the empty space, and the element can still be read in the accessibility tree in some cases.
Block elements start on a new line and take the full available width; inline elements sit in the text flow and ignore width and height; inline-block sits in the flow but accepts width, height, padding and margin on all sides.