← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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