← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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