← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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