← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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