← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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