← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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