← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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