← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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