← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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