← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. False
  2. False
  3. False
  4. True
  5. margin
  6. border
  7. space inside the border
  8. False
  9. False
  10. 150
  11. padding
  12. border
  13. content
  14. the gap round content
  15. 208
  16. 162
  17. False
  18. 312
  19. 132
  20. 124
  21. True
  22. 266
  23. space outside the border
  24. 266
  25. 114
  26. 382
  27. 92
  28. 74
  29. padding
  30. 232
  31. 172
  32. 262
  33. 296
  34. False
  35. the text or picture
  36. 128
  37. 160
  38. 98
  39. False
  40. False

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