← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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