← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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