← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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