← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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