← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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