← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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