← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. the text or picture
  2. content
  3. margin
  4. a solid or dotted edge
  5. space inside the border
  6. 274
  7. border
  8. 206
  9. 120
  10. 236
  11. padding
  12. False
  13. 94
  14. True
  15. 160
  16. 114
  17. False
  18. padding
  19. 222
  20. 66
  21. 174
  22. False
  23. 178
  24. False
  25. 238
  26. False
  27. False
  28. 144
  29. space outside the border
  30. 362
  31. border
  32. 218
  33. True
  34. 130
  35. 138
  36. 62
  37. 114
  38. the gap round content
  39. False
  40. 348

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