← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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