← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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