← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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