← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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