← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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