← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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