← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. 358
  2. 204
  3. False
  4. the text or picture
  5. 214
  6. 192
  7. 142
  8. 218
  9. 224
  10. 218
  11. 138
  12. 310
  13. 134
  14. space outside the border
  15. 108
  16. 92
  17. border
  18. 180
  19. False
  20. 128
  21. False
  22. 216
  23. 144
  24. True
  25. False
  26. 326
  27. True
  28. 148
  29. False
  30. the gap round content
  31. 142
  32. content
  33. 272
  34. 238
  35. True
  36. margin
  37. 236
  38. 340
  39. 302
  40. margin

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