← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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