← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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