← The box model lesson New set →

CSS Worksheet: Box Model

HTML and CSS lesson 16: The box model · Set 957 · 40 questions
TalentJR

Code tip (Inside out, twice): From the inside out: content → padding → border → margin. Border to border = width + 2 × padding + 2 × border. Total space = width + 2 × padding + 2 × border + 2 × margin.

NameDateTime takenScore ___ / 40
  1. 1.📦 In the box model, which part is the gap to other boxes? (a) border (b) margin (c) content (d) padding
  2. 2.True or false: margin is space inside the border. (a) True (b) False
  3. 3.Which of these is the content? (a) space outside the border (b) the text or picture (c) the gap to other boxes (d) space inside the border
  4. 4.📦 In the box model, which part is the line round the box? (a) margin (b) content (c) padding (d) border
  5. 5.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 70px;
      padding: 20px;
      border: 1px solid black;
      margin: 0px;
    }
  6. 6.True or false: padding is space inside the border. (a) False (b) True
  7. 7.Which of these is margin? (a) space inside the border (b) a solid or dotted edge (c) the line round the box (d) the gap to other boxes
  8. 8.Which of these is the border? (a) the text or picture (b) the gap round content (c) space inside the border (d) the line round the box
  9. 9.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 70px;
      padding: 15px;
      border: 1px solid black;
      margin: 0px;
    }
  10. 10.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 70px;
      padding: 10px;
      border: 1px solid black;
      margin: 15px;
    }
  11. 11.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 110px;
      padding: 30px;
      border: 1px solid black;
      margin: 20px;
    }
  12. 12.Which of these is margin? (a) the gap round content (b) the text or picture (c) space outside the border (d) space inside the border
  13. 13.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 30px;
      border: 2px solid black;
      margin: 10px;
    }
  14. 14.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 15px;
      border: 4px solid black;
      margin: 10px;
    }
  15. 15.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 70px;
      padding: 15px;
      border: 2px solid black;
      margin: 5px;
    }
  16. 16.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 270px;
      padding: 10px;
      border: 2px solid black;
      margin: 20px;
    }
  17. 17.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 210px;
      padding: 5px;
      border: 2px solid black;
      margin: 5px;
    }
  18. 18.True or false: padding is the text or picture. (a) True (b) False
  19. 19.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 210px;
      padding: 5px;
      border: 3px solid black;
      margin: 10px;
    }
  20. 20.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 200px;
      padding: 15px;
      border: 2px solid black;
      margin: 20px;
    }
  21. 21.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 25px;
      border: 5px solid black;
      margin: 0px;
    }
  22. 22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 260px;
      padding: 10px;
      border: 1px solid black;
      margin: 15px;
    }
  23. 23.📦 In the box model, which part is the text or picture? (a) padding (b) margin (c) border (d) content
  24. 24.Which of these is padding? (a) space inside the border (b) a solid or dotted edge (c) space outside the border (d) the line round the box
  25. 25.Which of these is the border? (a) space inside the border (b) space outside the border (c) the gap to other boxes (d) a solid or dotted edge
  26. 26.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 110px;
      padding: 25px;
      border: 4px solid black;
      margin: 5px;
    }
  27. 27.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 50px;
      padding: 25px;
      border: 4px solid black;
      margin: 0px;
    }
  28. 28.📦 In the box model, which part is a solid or dotted edge? (a) margin (b) content (c) padding (d) border
  29. 29.True or false: margin is the text or picture. (a) True (b) False
  30. 30.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 210px;
      padding: 10px;
      border: 2px solid black;
      margin: 15px;
    }
  31. 31.True or false: the border is the gap to other boxes. (a) True (b) False
  32. 32.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 10px;
      border: 2px solid black;
      margin: 0px;
    }
  33. 33.📦 In the box model, which part is space inside the border? (a) margin (b) content (c) padding (d) border
  34. 34.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 70px;
      padding: 25px;
      border: 4px solid black;
      margin: 0px;
    }
  35. 35.📦 In the box model, which part is space outside the border? (a) margin (b) border (c) padding (d) content
  36. 36.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 70px;
      padding: 10px;
      border: 3px solid black;
      margin: 10px;
    }
  37. 37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 140px;
      padding: 5px;
      border: 5px solid black;
      margin: 20px;
    }
  38. 38.True or false: padding is the gap to other boxes. (a) True (b) False
  39. 39.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 200px;
      padding: 30px;
      border: 3px solid black;
      margin: 15px;
    }
  40. 40.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 70px;
      padding: 20px;
      border: 4px solid black;
      margin: 0px;
    }

Answer key

  1. margin
  2. False
  3. the text or picture
  4. border
  5. 112
  6. True
  7. the gap to other boxes
  8. the line round the box
  9. 102
  10. 122
  11. 212
  12. space outside the border
  13. 124
  14. 248
  15. 114
  16. 334
  17. 224
  18. False
  19. 246
  20. 274
  21. 250
  22. 282
  23. content
  24. space inside the border
  25. a solid or dotted edge
  26. 178
  27. 108
  28. border
  29. False
  30. 234
  31. False
  32. 64
  33. padding
  34. 128
  35. margin
  36. 116
  37. 160
  38. False
  39. 296
  40. 118

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids