← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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