← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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