← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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