← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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