← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. False
  2. 248
  3. 142
  4. 274
  5. True
  6. the text or picture
  7. padding
  8. 122
  9. True
  10. 114
  11. 108
  12. 126
  13. 190
  14. False
  15. 192
  16. 204
  17. 290
  18. border
  19. margin
  20. padding
  21. 192
  22. False
  23. 272
  24. 224
  25. 226
  26. 156
  27. 204
  28. 300
  29. 252
  30. False
  31. 168
  32. border
  33. False
  34. True
  35. margin
  36. True
  37. the gap round content
  38. 160
  39. 292
  40. content

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