← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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