← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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