← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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