← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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