← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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