← The box model lesson New set →

CSS Worksheet: Box Model

HTML and CSS lesson 16: The box model · Set 913 · 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.Which of these is margin? (a) space inside the border (b) the gap round content (c) the line round the box (d) the gap to other boxes
  2. 2.Which of these is the content? (a) the text or picture (b) space inside the border (c) the line round the box (d) the gap round content
  3. 3.📦 In the box model, which part is the gap to other boxes? (a) border (b) padding (c) margin (d) content
  4. 4.📦 In the box model, which part is the gap round content? (a) padding (b) margin (c) border (d) content
  5. 5.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 120px;
      padding: 5px;
      border: 2px solid black;
      margin: 0px;
    }
  6. 6.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 120px;
      padding: 10px;
      border: 2px solid black;
      margin: 20px;
    }
  7. 7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 90px;
      padding: 5px;
      border: 2px solid black;
      margin: 0px;
    }
  8. 8.📦 In the box model, which part is space outside the border? (a) margin (b) content (c) border (d) padding
  9. 9.Which of these is the border? (a) space inside the border (b) a solid or dotted edge (c) the gap to other boxes (d) the text or picture
  10. 10.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 80px;
      padding: 30px;
      border: 4px solid black;
      margin: 0px;
    }
  11. 11.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 5px;
      border: 3px solid black;
      margin: 5px;
    }
  12. 12.📦 In the box model, which part is the line round the box? (a) margin (b) padding (c) border (d) content
  13. 13.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 90px;
      padding: 10px;
      border: 3px solid black;
      margin: 15px;
    }
  14. 14.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 100px;
      padding: 10px;
      border: 5px solid black;
      margin: 15px;
    }
  15. 15.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 280px;
      padding: 30px;
      border: 4px solid black;
      margin: 20px;
    }
  16. 16.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 170px;
      padding: 5px;
      border: 1px solid black;
      margin: 0px;
    }
  17. 17.True or false: margin is space inside the border. (a) False (b) True
  18. 18.True or false: margin is the gap to other boxes. (a) True (b) False
  19. 19.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 180px;
      padding: 20px;
      border: 1px solid black;
      margin: 20px;
    }
  20. 20.True or false: the content is the text or picture. (a) True (b) False
  21. 21.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 230px;
      padding: 20px;
      border: 3px solid black;
      margin: 15px;
    }
  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: 20px;
      border: 5px solid black;
      margin: 15px;
    }
  23. 23.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 200px;
      padding: 30px;
      border: 4px solid black;
      margin: 0px;
    }
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 220px;
      padding: 10px;
      border: 3px solid black;
      margin: 10px;
    }
  25. 25.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 120px;
      padding: 25px;
      border: 2px solid black;
      margin: 5px;
    }
  26. 26.True or false: the border is the text or picture. (a) False (b) True
  27. 27.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 150px;
      padding: 5px;
      border: 3px solid black;
      margin: 10px;
    }
  28. 28.True or false: the border is the gap to other boxes. (a) False (b) True
  29. 29.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 10px;
      border: 4px solid black;
      margin: 10px;
    }
  30. 30.Which of these is padding? (a) the gap to other boxes (b) space inside the border (c) a solid or dotted edge (d) the text or picture
  31. 31.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 220px;
      padding: 10px;
      border: 2px solid black;
      margin: 15px;
    }
  32. 32.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 160px;
      padding: 30px;
      border: 2px solid black;
      margin: 20px;
    }
  33. 33.📦 In the box model, which part is a solid or dotted edge? (a) border (b) padding (c) content (d) margin
  34. 34.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 20px;
      border: 5px solid black;
      margin: 5px;
    }
  35. 35.True or false: the content is space inside the border. (a) False (b) True
  36. 36.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 30px;
      border: 1px solid black;
      margin: 0px;
    }
  37. 37.True or false: the border is the line round the box. (a) True (b) False
  38. 38.Which of these is padding? (a) the line round the box (b) a solid or dotted edge (c) the gap round content (d) space outside the border
  39. 39.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 100px;
      padding: 30px;
      border: 5px solid black;
      margin: 5px;
    }
  40. 40.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 5px;
      border: 5px solid black;
      margin: 20px;
    }

Answer key

  1. the gap to other boxes
  2. the text or picture
  3. margin
  4. padding
  5. 134
  6. 184
  7. 104
  8. margin
  9. a solid or dotted edge
  10. 148
  11. 86
  12. border
  13. 146
  14. 160
  15. 348
  16. 182
  17. False
  18. True
  19. 262
  20. True
  21. 306
  22. 310
  23. 268
  24. 266
  25. 184
  26. False
  27. 186
  28. False
  29. 108
  30. space inside the border
  31. 274
  32. 264
  33. border
  34. 100
  35. False
  36. 122
  37. True
  38. the gap round content
  39. 170
  40. 110

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