← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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