← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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