← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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