← The box model lesson New set →

CSS Worksheet: Box Model

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

Answer key

  1. True
  2. the line round the box
  3. space inside the border
  4. a solid or dotted edge
  5. 178
  6. 110
  7. False
  8. 250
  9. 338
  10. 238
  11. 280
  12. the gap round content
  13. 168
  14. 174
  15. space outside the border
  16. the text or picture
  17. 198
  18. True
  19. False
  20. True
  21. 162
  22. False
  23. the gap to other boxes
  24. 168
  25. 250
  26. False
  27. 222
  28. content
  29. False
  30. 294
  31. 148
  32. 320
  33. 342
  34. padding
  35. 144
  36. 380
  37. 304
  38. False
  39. False
  40. False

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