← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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