← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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