← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. 240
  2. 256
  3. True
  4. 100
  5. 114
  6. the text or picture
  7. 150
  8. False
  9. True
  10. space inside the border
  11. content
  12. False
  13. 274
  14. 204
  15. False
  16. the line round the box
  17. 246
  18. 110
  19. 272
  20. 190
  21. 342
  22. 78
  23. 132
  24. 222
  25. padding
  26. False
  27. 284
  28. margin
  29. 310
  30. 328
  31. 334
  32. 268
  33. 148
  34. 258
  35. 320
  36. border
  37. padding
  38. 152
  39. True
  40. False

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