← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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