← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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