← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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