← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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