← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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