← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. True
  2. space inside the border
  3. the gap round content
  4. border
  5. 162
  6. margin
  7. padding
  8. 330
  9. the text or picture
  10. 326
  11. False
  12. 142
  13. 192
  14. 128
  15. True
  16. False
  17. False
  18. 154
  19. True
  20. 308
  21. content
  22. 156
  23. 198
  24. True
  25. 308
  26. 346
  27. 186
  28. margin
  29. 102
  30. 284
  31. False
  32. a solid or dotted edge
  33. False
  34. 144
  35. 138
  36. 198
  37. border
  38. 136
  39. 232
  40. False

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