← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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