← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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