← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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