← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

HTML and CSS lesson 14: Colour and text properties · Set 351 · 40 questions
TalentJR

Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.

NameDateTime takenScore ___ / 40
  1. 1.What does background-color do? (a) makes letters bigger (b) makes the text bold (c) colours behind the text (d) centres a heading
  2. 2.What does font-weight do? (a) picks the font style (b) sets the letter colour (c) makes the text bold (d) centres a heading
  3. 3.What does color do? (a) sets the letter colour (b) makes letters bigger (c) colours behind the text (d) makes the text bold
  4. 4.🖌️ Which CSS property sets the letter colour? (a) font-family (b) color (c) background-color (d) text-align
  5. 5.🖌️ What colour are the letters?
    p {
      color: blue;
      text-align: center;
      background-color: yellow;
      font-size: 12px;
    }
    (a) black (b) yellow (c) blue
  6. 6.🖌️ Where does the text sit on its line?
    h2 {
      font-size: 28px;
      text-align: right;
      color: orange;
      background-color: red;
    }
    (a) on the left (b) in the middle (c) on the right
  7. 7.🖌️ What colour are the letters?
    h2 {
      text-align: left;
      font-size: 12px;
      color: white;
      background-color: red;
    }
    (a) white (b) orange (c) red
  8. 8.🖌️ Where does the text sit on its line?
    h1 {
      background-color: white;
      text-align: center;
      font-size: 12px;
      color: black;
    }
    (a) on the left (b) in the middle (c) on the right
  9. 9.🖌️ Where does the text sit on its line?
    p {
      color: blue;
      font-size: 24px;
      background-color: orange;
      text-align: right;
    }
    (a) on the left (b) in the middle (c) on the right
  10. 10.🖌️ Which CSS property picks the font style? (a) font-size (b) text-align (c) font-family (d) color
  11. 11.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 24px;
      text-align: left;
      background-color: white;
      color: orange;
    }
    (a) on the left (b) in the middle (c) on the right
  12. 12.🖌️ Which CSS property makes letters bigger? (a) text-align (b) font-size (c) font-weight (d) background-color
  13. 13.🖌️ Which CSS property makes the text bold? (a) font-size (b) background-color (c) font-weight (d) font-family
  14. 14.What does font-size do? (a) makes letters bigger (b) colours behind the text (c) sets the letter colour (d) centres a heading
  15. 15.🖌️ How big is the text, in px?
    h1 {
      text-align: center;
      background-color: purple;
      color: green;
      font-size: 20px;
    }
  16. 16.🖌️ Where does the text sit on its line?
    h1 {
      background-color: orange;
      font-size: 28px;
      text-align: left;
      color: white;
    }
    (a) in the middle (b) on the left (c) on the right
  17. 17.🖌️ What colour are the letters?
    h2 {
      background-color: black;
      text-align: center;
      font-size: 28px;
      color: yellow;
    }
    (a) black (b) yellow (c) blue
  18. 18.🖌️ Which CSS property centres a heading? (a) background-color (b) color (c) font-family (d) text-align
  19. 19.🖌️ What colour are the letters?
    p {
      font-size: 28px;
      text-align: right;
      color: white;
      background-color: yellow;
    }
    (a) white (b) red (c) yellow
  20. 20.🖌️ How big is the text, in px?
    h2 {
      background-color: yellow;
      font-size: 12px;
      color: green;
      text-align: right;
    }
  21. 21.🖌️ Where does the text sit on its line?
    h1 {
      text-align: right;
      color: yellow;
      background-color: red;
      font-size: 24px;
    }
    (a) on the right (b) on the left (c) in the middle
  22. 22.🖌️ What colour is behind the letters?
    li {
      font-size: 24px;
      background-color: purple;
      text-align: right;
      color: white;
    }
    (a) purple (b) blue (c) white
  23. 23.🖌️ What colour are the letters?
    h2 {
      background-color: green;
      color: white;
      text-align: left;
      font-size: 32px;
    }
    (a) purple (b) white (c) green
  24. 24.🖌️ What colour is behind the letters?
    p {
      color: purple;
      font-size: 12px;
      background-color: blue;
      text-align: right;
    }
    (a) blue (b) red (c) purple
  25. 25.🖌️ What colour are the letters?
    h1 {
      text-align: right;
      font-size: 28px;
      background-color: purple;
      color: blue;
    }
    (a) red (b) blue (c) purple
  26. 26.🖌️ What colour is behind the letters?
    p {
      color: green;
      font-size: 16px;
      text-align: left;
      background-color: purple;
    }
    (a) purple (b) yellow (c) green
  27. 27.🖌️ How big is the text, in px?
    h2 {
      font-size: 16px;
      color: red;
      background-color: green;
      text-align: right;
    }
  28. 28.🖌️ Where does the text sit on its line?
    p {
      color: white;
      text-align: center;
      font-size: 24px;
      background-color: green;
    }
    (a) on the left (b) on the right (c) in the middle
  29. 29.🖌️ How big is the text, in px?
    h2 {
      font-size: 12px;
      color: blue;
      text-align: left;
      background-color: green;
    }
  30. 30.🖌️ What colour is behind the letters?
    p {
      background-color: blue;
      text-align: left;
      color: yellow;
      font-size: 32px;
    }
    (a) green (b) blue (c) yellow
  31. 31.🖌️ Where does the text sit on its line?
    h1 {
      color: white;
      font-size: 12px;
      text-align: right;
      background-color: orange;
    }
    (a) on the left (b) in the middle (c) on the right
  32. 32.What does text-align do? (a) makes letters bigger (b) picks the font style (c) colours behind the text (d) centres a heading
  33. 33.🖌️ What colour are the letters?
    li {
      color: green;
      font-size: 20px;
      text-align: center;
      background-color: blue;
    }
    (a) blue (b) green (c) black
  34. 34.🖌️ Where does the text sit on its line?
    p {
      background-color: orange;
      text-align: left;
      font-size: 32px;
      color: purple;
    }
    (a) on the right (b) in the middle (c) on the left
  35. 35.🖌️ How big is the text, in px?
    h1 {
      background-color: purple;
      font-size: 16px;
      color: white;
      text-align: right;
    }
  36. 36.🖌️ What colour are the letters?
    li {
      font-size: 16px;
      text-align: right;
      background-color: white;
      color: green;
    }
    (a) green (b) black (c) white
  37. 37.🖌️ How big is the text, in px?
    h1 {
      background-color: red;
      text-align: right;
      font-size: 12px;
      color: purple;
    }
  38. 38.🖌️ What colour is behind the letters?
    li {
      font-size: 12px;
      background-color: yellow;
      text-align: center;
      color: purple;
    }
    (a) red (b) yellow (c) purple
  39. 39.🖌️ How big is the text, in px?
    li {
      text-align: left;
      background-color: black;
      color: white;
      font-size: 40px;
    }
  40. 40.🖌️ How big is the text, in px?
    li {
      color: green;
      font-size: 24px;
      text-align: left;
      background-color: blue;
    }

Answer key

  1. colours behind the text
  2. makes the text bold
  3. sets the letter colour
  4. color
  5. blue
  6. on the right
  7. white
  8. in the middle
  9. on the right
  10. font-family
  11. on the left
  12. font-size
  13. font-weight
  14. makes letters bigger
  15. 20
  16. on the left
  17. yellow
  18. text-align
  19. white
  20. 12
  21. on the right
  22. purple
  23. white
  24. blue
  25. blue
  26. purple
  27. 16
  28. in the middle
  29. 12
  30. blue
  31. on the right
  32. centres a heading
  33. green
  34. on the left
  35. 16
  36. green
  37. 12
  38. yellow
  39. 40
  40. 24

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