← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. 186
  2. 138
  3. 256
  4. 98
  5. border
  6. padding
  7. True
  8. 252
  9. 144
  10. False
  11. margin
  12. 212
  13. margin
  14. padding
  15. space inside the border
  16. 384
  17. 322
  18. 178
  19. the gap round content
  20. False
  21. False
  22. a solid or dotted edge
  23. content
  24. 288
  25. True
  26. 290
  27. 142
  28. the gap to other boxes
  29. 262
  30. space outside the border
  31. 82
  32. 134
  33. 318
  34. False
  35. True
  36. 126
  37. 196
  38. 148
  39. False
  40. 164

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