← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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