← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. True
  2. margin
  3. border
  4. border
  5. True
  6. content
  7. padding
  8. 198
  9. 180
  10. 182
  11. 284
  12. 334
  13. the text or picture
  14. 162
  15. 114
  16. 160
  17. space outside the border
  18. 136
  19. False
  20. False
  21. 234
  22. 132
  23. False
  24. True
  25. padding
  26. 158
  27. False
  28. 182
  29. 262
  30. False
  31. 310
  32. 220
  33. True
  34. 100
  35. the gap round content
  36. margin
  37. 232
  38. 158
  39. False
  40. 252

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