← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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