Box Model & Layout interview questions

21 Box Model & Layout questions from the CSS bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Sign up free to see every answer with its explanation and ask the AI tutor.

Practice Box Model & Layout free

1. What is box-sizing border-box?

Junior
  1. A.a value making an element's declared width and height include its padding and border
  2. B.the space between an element's content and its border
  3. C.spacing declared between flex or grid items without adding it to the outer edges
  4. D.an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible

Answer + AI explanation with a free account

2. Which term means: "a value making an element's declared width and height include its padding and border"?

Junior
  1. A.gap property
  2. B.box-sizing content-box
  3. C.box-sizing border-box
  4. D.margin collapsing

Answer + AI explanation with a free account

3. Which statement is correct?

Junior
  1. A.box-sizing border-box — spacing declared between flex or grid items without adding it to the outer edges
  2. B.box-sizing border-box — the default value where declared width and height apply only to the content area, excluding padding and border
  3. C.box-sizing border-box — the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  4. D.box-sizing border-box — a value making an element's declared width and height include its padding and border

Answer + AI explanation with a free account

4. What is box-sizing content-box?

Junior
  1. A.a value making an element's declared width and height include its padding and border
  2. B.the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  3. C.the default value where declared width and height apply only to the content area, excluding padding and border
  4. D.the space between an element's content and its border

Answer + AI explanation with a free account

5. Which term means: "the default value where declared width and height apply only to the content area, excluding padding and border"?

Junior
  1. A.gap property
  2. B.inline-block
  3. C.box-sizing content-box
  4. D.block formatting context

Answer + AI explanation with a free account

6. Which statement is correct?

Junior
  1. A.box-sizing content-box — a display value that flows inline like text but accepts width, height, and vertical margins
  2. B.box-sizing content-box — the default value where declared width and height apply only to the content area, excluding padding and border
  3. C.box-sizing content-box — an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible
  4. D.box-sizing content-box — spacing declared between flex or grid items without adding it to the outer edges

Answer + AI explanation with a free account

7. What is margin collapsing?

Junior
  1. A.a value making an element's declared width and height include its padding and border
  2. B.a display value that flows inline like text but accepts width, height, and vertical margins
  3. C.the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  4. D.the default value where declared width and height apply only to the content area, excluding padding and border

Answer + AI explanation with a free account

8. Which term means: "the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two"?

Junior
  1. A.margin collapsing
  2. B.inline-block
  3. C.padding
  4. D.block formatting context

Answer + AI explanation with a free account

9. Which statement is correct?

Junior
  1. A.margin collapsing — the default value where declared width and height apply only to the content area, excluding padding and border
  2. B.margin collapsing — the space between an element's content and its border
  3. C.margin collapsing — the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  4. D.margin collapsing — spacing declared between flex or grid items without adding it to the outer edges

Answer + AI explanation with a free account

10. What is block formatting context?

Mid
  1. A.the space between an element's content and its border
  2. B.a value making an element's declared width and height include its padding and border
  3. C.the default value where declared width and height apply only to the content area, excluding padding and border
  4. D.an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible

Answer + AI explanation with a free account

11. Which term means: "an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible"?

Mid
  1. A.margin collapsing
  2. B.block formatting context
  3. C.box-sizing border-box
  4. D.padding

Answer + AI explanation with a free account

12. Which statement is correct?

Mid
  1. A.block formatting context — spacing declared between flex or grid items without adding it to the outer edges
  2. B.block formatting context — an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible
  3. C.block formatting context — a display value that flows inline like text but accepts width, height, and vertical margins
  4. D.block formatting context — the space between an element's content and its border

Answer + AI explanation with a free account

13. What is inline-block?

Mid
  1. A.the space between an element's content and its border
  2. B.a value making an element's declared width and height include its padding and border
  3. C.spacing declared between flex or grid items without adding it to the outer edges
  4. D.a display value that flows inline like text but accepts width, height, and vertical margins

Answer + AI explanation with a free account

14. Which term means: "a display value that flows inline like text but accepts width, height, and vertical margins"?

Mid
  1. A.margin collapsing
  2. B.inline-block
  3. C.box-sizing border-box
  4. D.padding

Answer + AI explanation with a free account

15. Which statement is correct?

Mid
  1. A.inline-block — the default value where declared width and height apply only to the content area, excluding padding and border
  2. B.inline-block — a display value that flows inline like text but accepts width, height, and vertical margins
  3. C.inline-block — an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible
  4. D.inline-block — the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two

Answer + AI explanation with a free account

16. What is padding?

Junior
  1. A.a value making an element's declared width and height include its padding and border
  2. B.the space between an element's content and its border
  3. C.spacing declared between flex or grid items without adding it to the outer edges
  4. D.the default value where declared width and height apply only to the content area, excluding padding and border

Answer + AI explanation with a free account

17. Which term means: "the space between an element's content and its border"?

Junior
  1. A.box-sizing border-box
  2. B.padding
  3. C.gap property
  4. D.block formatting context

Answer + AI explanation with a free account

18. Which statement is correct?

Junior
  1. A.padding — an isolated layout region whose floats and margins do not affect the outside, triggered by overflow other than visible
  2. B.padding — the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  3. C.padding — a value making an element's declared width and height include its padding and border
  4. D.padding — the space between an element's content and its border

Answer + AI explanation with a free account

19. What is gap property?

Mid
  1. A.a display value that flows inline like text but accepts width, height, and vertical margins
  2. B.the default value where declared width and height apply only to the content area, excluding padding and border
  3. C.the space between an element's content and its border
  4. D.spacing declared between flex or grid items without adding it to the outer edges

Answer + AI explanation with a free account

20. Which term means: "spacing declared between flex or grid items without adding it to the outer edges"?

Mid
  1. A.margin collapsing
  2. B.box-sizing border-box
  3. C.padding
  4. D.gap property

Answer + AI explanation with a free account

21. Which statement is correct?

Mid
  1. A.gap property — the behavior where adjacent vertical spacing of block elements combines into a single gap equal to the larger of the two
  2. B.gap property — the space between an element's content and its border
  3. C.gap property — a value making an element's declared width and height include its padding and border
  4. D.gap property — spacing declared between flex or grid items without adding it to the outer edges

Answer + AI explanation with a free account

Free to start

Answers, AI explanations, and a free readiness check

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take the free 2-minute readiness check for a scored result. One full AI mock interview, scored like a real panel, is free when you sign up.

Practice Box Model & Layout free
24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers