← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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