← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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