← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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