← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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