← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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