← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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