← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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