← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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