← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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