← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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