← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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