← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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