← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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