← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. padding
  2. False
  3. padding
  4. the gap round content
  5. 258
  6. 186
  7. False
  8. 142
  9. False
  10. 90
  11. 262
  12. 264
  13. border
  14. 232
  15. False
  16. False
  17. 242
  18. space outside the border
  19. 190
  20. 114
  21. margin
  22. the gap to other boxes
  23. 212
  24. 100
  25. 194
  26. False
  27. True
  28. 228
  29. 342
  30. 354
  31. 228
  32. 278
  33. 106
  34. 110
  35. the text or picture
  36. 344
  37. False
  38. 262
  39. 250
  40. border

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